stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: Vae not loaded at startup if selected, it is loaded after first generation.
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
When you start the application the VAE selected is not loaded. it says: Couldn't find VAE named vae-ft-mse-840000-ema-pruned.safetensors; using None instead It is loaded after the first image generation.
Steps to reproduce the problem
- Open Webui
- Select a VAE
- Restart Webui
- Observe that the VAE is not loaded
- Try generating an image
- The VAE is now loaded
What should have happened?
VAE should load at startup
Commit where the problem happens
b08500c
What platforms do you use to access the UI ?
Windows
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
--no-half-vae
List of extensions
No
Console logs
Creating model from config: D:\Programmi\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Couldn't find VAE named vae-ft-mse-840000-ema-pruned.safetensors; using None instead
Applying scaled dot product cross attention optimization.
Additional information
No response
Me too
Addendum: Loras too have the same problem, loaded after first generation.
Same here, it appeared after git pull
Happens with both the .ckpt
and .safetensors
versions of the VAE.
For me, VAE never seems to load. During startup, I get this error:
Couldn't find VAE named AnythingV5.vae.pt; using None instead
Tried multiple VAEs, .vae.pt or .safetensors, no difference. The only way I get a functionnal VAE is by selecting None, then selecting the VAE I want. I must do this everytime I restart.
Same here.
I removed/deleted dreambooth extension from extensions folder and did pip uninstall Pillow, gitpython, transformers, google-auth-oauthlib, fastapi
. This fixed my VAE loading issue. I did these 2 steps together, so do not really know which of these fixed the issue.
Edit: reinstalled dreambooth again and the Missing VAE issue came back. For now, dirty solution is by selecting None and selecting VAE again in the UI.
This happens because VAE is attempted to load during modules.scripts.load_scripts()
in initialize_rest
in webui.py
, (line 274)
but since modules.sd_vae.refresh_vae_list()
hasn't run yet (line 284), vae_list
is empty at this stage, leading to VAE not loading at startup but able to be loaded once the UI has come up.
Not sure why VAEs would be attempted to load during the script loading stage, but the simplest workaround is running modules.sd_vae.refresh_vae_list()
before modules.scripts.load_scripts()
. But I'm not sure if it will have any repercussions.
Another more tame workaround would be to modify the function resolve_vae
in modules/sd_vae.py
, so that it will first check whether vae_list
is empty, then run refresh_vae_list()
if true.
But more importantly... if this problem is caused by scripts/extensions outside of this repo, is it appropriate to apply the "fix" here?
Confirmed problems when space-nuko/a1111-stable-diffusion-webui-vram-estimator AND/OR d8ahazard/sd_dreambooth_extension installed.
I have this too. My Version is up to date and I have neither Dreambooth or vraam-estminator installed. Couldn't find VAE named vae-ft-mse-840000-ema-pruned.ckpt; using None instead
Can confirm https://github.com/7eu7d7/DreamArtist-stable-diffusion is also causing the error (I installed it a long time ago and didn't delete it)
me too
Same here, without 2 extensions mentioned above. So how to fix this?
Having this issue in the recent build as well. Default VAE was loading just fine and then it just suddenly stopped loading. Even after generating first image doesn't do anything. I have to manually load it myself.