Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh Forge install via pinokio fails with: sqlite3.OperationalError: no such column: "size" #2669

Open
Hundekraft opened this issue Feb 19, 2025 · 17 comments

Comments

@Hundekraft
Copy link

Seems to fail when reading metadata.
I've tried to redownload the model, but get the same message.

reading metadata for F:\pinokio\api\stable-diffusion-webui-forge.git\app\models\Stable-diffusion\flux1-dev-bnb-nf4-v2.safetensors: OperationalError
Traceback (most recent call last):
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\modules\sd_models.py", line 89, in init
self.metadata = cache.cached_data_for_file('safetensors-metadata', "checkpoint/" + name, filename, read_metadata)
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\modules\cache.py", line 119, in cached_data_for_file
existing_cache[title] = entry
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\venv\lib\site-packages\diskcache\core.py", line 823, in setitem
self.set(key, value, retry=True)
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\venv\lib\site-packages\diskcache\core.py", line 808, in set
self._row_insert(db_key, raw, now, columns)
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\venv\lib\site-packages\diskcache\core.py", line 857, in _row_insert
sql(
sqlite3.OperationalError: no such column: "size" - should this be a string literal in single-quotes?

Loading Model: {'checkpoint_info': {'filename': 'F:\pinokio\api\stable-diffusion-webui-forge.git\app\models\Stable-diffusion\flux1-dev-bnb-nf4-v2.safetensors', 'hash': 'f0770152'}
, 'additional_modules': [], 'unet_storage_dtype': None}
[Unload] Trying to free all memory for cuda:0 with 0 models keep loaded ... Done.
StateDict Keys: {'transformer': 1722, 'vae': 244, 'text_encoder': 198, 'text_encoder_2': 220, 'ignore': 0}
Using Detected T5 Data Type: torch.float8_e4m3fn
Using Detected UNet Type: nf4
Using pre-quant state dict!
Working with z of shape (1, 16, 32, 32) = 16384 dimensions.
K-Model Created: {'storage_dtype': 'nf4', 'computation_dtype': torch.bfloat16}
Calculating sha256 for F:\pinokio\api\stable-diffusion-webui-forge.git\app\models\Stable-diffusion\flux1-dev-bnb-nf4-v2.safetensors:
fef37763b8f2c8cc3463139bbb6d91aa517c605b654d4e5c540de
52813f30306
Traceback (most recent call last):
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\modules_forge\main_thread.py", line 30, in work
self.result = self.func(*self.args, **self.kwargs)
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\modules\txt2img.py", line 131, in txt2img_function
processed = processing.process_images(p)
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\modules\processing.py", line 836, in process_images
manage_model_and_prompt_cache(p)
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\modules\processing.py", line 804, in manage_model_and_prompt_cache
p.sd_model, just_reloaded = forge_model_reload()
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\venv\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\modules\sd_models.py", line 511, in forge_model_reload
sd_model.sd_model_hash = checkpoint_info.calculate_shorthash()
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\modules\sd_models.py", line 114, in calculate_shorthash
self.sha256 = hashes.sha256(self.filename, f"checkpoint/{self.name}")
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\modules\hashes.py", line 67, in sha256
hashes[title] = {
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\venv\lib\site-packages\diskcache\core.py", line 823, in setitem
self.set(key, value, retry=True)
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\venv\lib\site-packages\diskcache\core.py", line 808, in set
self._row_insert(db_key, raw, now, columns)
File "F:\pinokio\api\stable-diffusion-webui-forge.git\app\venv\lib\site-packages\diskcache\core.py", line 857, in _row_insert
sql(
sqlite3.OperationalError: no such column: "size" - should this be a string literal in single-quotes?
no such column: "size" - should this be a string literal in single-quotes?

@Yossik19
Copy link

I have the same issue unfortunatelly.

@ghost
Copy link

ghost commented Feb 19, 2025

the same :C

@waylonwang
Copy link

+1

@Raymondwwww
Copy link

sameee

@Raymondwwww
Copy link

any fixes?

@cassianyoung
Copy link

+1

@Fox-Int
Copy link

Fox-Int commented Feb 19, 2025

Sames

@DDBE12
Copy link

DDBE12 commented Feb 19, 2025

This seems to affect all the Pinokio apps/scripts now. I was peacefully generating images with SD this morning when all of a sudden this popped up between one image generation to another. Tried to delete SD and re-install, but ever since this error started, the installs also throw blue-background errors and then this when trying to generate.

Tried to install RealtimeStableDiffusion as replacement and it was the same. Then tried my two other installed apps/scripts that still were working yesterday: ComfyUI and Hunyuan. They're all throwing this ominous error now when trying to do generations or use them.

I'm kinda worried it's some anti-AI hacking.

@DDBE12
Copy link

DDBE12 commented Feb 19, 2025

It's also happening outside of Pinokio now: easydiffusion/easydiffusion#1905

@w-e-w
Copy link
Contributor

w-e-w commented Feb 20, 2025

repost of AUTOMATIC1111/stable-diffusion-webui#16856 (comment)

can someone who is experiencing this issue upload their cache dir directory in webui root and upload it here
this might help figuring out what's going on

I belive you would need to compress it into a zip archive

note: by uploaded this you would essentially upload a list of your all your models info (not the actual models just information about the models) and extensions infos, they could potentially be other things as well created by extensions
normally they shouldn't be anything I personally would consider sensitive in it, but if you're not comfortable with someone knowing what models you have or what extensions you're using, don't upload it.

@Fox-Int
Copy link

Fox-Int commented Feb 20, 2025

looks like the culprit is libsqlite 3.49.1. It was updated recently causing a few apps to break.

The new pinokio version has a work around in place even though its not a pinokio issue.
https://github.com/cocktailpeanutlabs/p2/releases/tag/3.6.22

@w-e-w
Copy link
Contributor

w-e-w commented Feb 20, 2025

@Fox-Int

looks like the culprit is libsqlite 3.49.1. It was updated recently causing a few apps to break.

are you certain
as in do you have evidence that shows sqlite 3.49.1 it is actually the cause?
or is it something that you deduced because of the occurrence of this issue coincided with the recent update to sqlite3?

as far as I'm aware python on windwos uses the sqlite that is bundle in python
and I believe it will not be update not updated on this you update / change the entire python version
so python on Windows should be still using an old version of sqlite

I have done quick test by / replaceing the bundled sqlite3.dll with version 3.49.1 manually updating sqlite
but it still seems to work fin after the update

I'm not certain if this update method is valid, and I'm not certain of this test is valid.

this issue occurs on multiple platforms including Windows and Mac


what is this cocktailpeanutlabs/p2/releases/tag/3.6.22 strange "empty" repo?

@Fox-Int
Copy link

Fox-Int commented Feb 20, 2025

This user had the same issue and reverted to a previous version and it worked.
fau-advanced-separations/CADET-Process#229

ive just installed the Pinokio version which addresses the issue and it works fine. It was raised with the devs on the Pinokio discord.

Image

Image

Image

@w-e-w
Copy link
Contributor

w-e-w commented Feb 20, 2025

@Fox-Int thanks, I belive your are rightm it seems to be an issue with 3.49.1
some one on mac seem to have got it working by downgreading
AUTOMATIC1111/stable-diffusion-webui#16856 (comment)

@cocktailpeanut
Copy link

what is this cocktailpeanutlabs/p2/releases/tag/3.6.22 strange "empty" repo?

@w-e-w that is a repo i use for publishing beta releases for pinokio.computer (i'm the author), which makes it easy to manage and launch apps like forge in a single UI.

I spent a whole day trying to debug this and finally found the culprit, it is the sqlite 3.4.91 (AND 3.4.90 as well, but the issue was only surfaced in 3.4.91). They added something that's not yet available (SQLITE_DQS=0) conda-forge/sqlite-feedstock#130

installing sqliate<3.4.90 fixes this issue. Hopefully the conda-forge sqlite folks get their stuff together and fix this completely broken release soon so we don't have to do this.

p.s.

For those of you who are running forge through pinokio: I've made the fix i mentioned above and did a rigorous testing and this new version should work https://github.com/cocktailpeanutlabs/p2/releases/tag/3.6.23

@w-e-w
Copy link
Contributor

w-e-w commented Feb 20, 2025

@cocktailpeanut thank you very much for the information
was going a bit insane myself

@Hundekraft
Copy link
Author

Thanks @cocktailpeanut, works perfectly now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants