anapnoe / stable-diffusion-webui-ux

Stable Diffusion web UI UX
GNU Affero General Public License v3.0
989 stars 58 forks source link

[Bug]: Cannot Find VAE on startup of WebUI #146

Closed rushuna86 closed 1 year ago

rushuna86 commented 1 year ago

Is there an existing issue for this?

What happened?

Every start up with WebUI console showing "Couldn't find VAE named XXXXX" Using None Instead.

Steps to reproduce the problem

Every Start Up of WebUI

What should have happened?

Load selected VAE from SD_VAE.

Commit where the problem happens

Update 1.2.0 (f2b9c2c was working fine)

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--opt-sdp-attention --no-half-vae --autolaunch

List of extensions

Built-in only. Happens with clean install as well.

Console logs

Couldn't find VAE named clearvae_variant.safetensors; using None instead
Applying scaled dot product cross attention optimization.
Textual inversion embeddings loaded(7): bad_prompt_version2-neg, badhandv4, badv5, easynegative, ng_deepnegative_v1_75t, pureerosface_v1, ulzzang-6500-v1.1
Model loaded in 2.1s (load weights from disk: 0.4s, create model: 0.2s, apply weights to model: 0.8s, apply half(): 0.3s, move model to device: 0.4s).

To create a public link, set `share=True` in `launch()`.
Startup time: 8.4s (import torch: 0.9s, import gradio: 0.6s, import ldm: 0.3s, other imports: 1.4s, load scripts: 3.4s, create ui: 1.6s, gradio launch: 0.1s).
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:02<00:00,  8.46it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:00<00:00, 31.17it/s]
Loading VAE weights specified in settings: D:\SD\WebUIX\models\VAE\ClearVAE_NansLess1.safetensors0:00<00:00, 35.61it/s]
Applying scaled dot product cross attention optimization.
VAE weights loaded.
Loading VAE weights specified in settings: D:\SD\WebUIX\models\VAE\clearvae_variant.safetensors
Applying scaled dot product cross attention optimization.
VAE weights loaded.

Additional information

After WebUI Loads inside VAE List quicksetting actually shows clearvae_variant.safetensors as selected. Inside settings also shows it as selected, but image generation is done with None as per console. Have to go in quicksetting/setting change to different VAE and back for it to load.

rushuna86 commented 1 year ago

Console from Commit f2b9c2c with exactly the same everything even all extensions loaded Launching Web UI with arguments: --opt-sdp-attention --no-half-vae --autolaunch No module 'xformers'. Proceeding without it. Civitai Helper: Get Custom Model Folder Civitai Helper: Load setting from: D:\SD\WebUIX\extensions\Stable-Diffusion-Webui-Civitai-Helper\setting.json Civitai Helper: No setting file, use default [AddNet] Updating model hashes... 100%|█████████████████████████████████████████████████████████████████████████████████| 86/86 [00:00<00:00, 842.79it/s] [AddNet] Updating model hashes... 100%|█████████████████████████████████████████████████████████████████████████████████| 86/86 [00:00<00:00, 844.23it/s] ControlNet v1.1.173 ControlNet v1.1.173 Loading weights [db1b218a5b] from D:\SD\WebUIX\models\Stable-diffusion\Chibi-Mix.safetensors Creating model from config: D:\SD\WebUIX\configs\v1-inference.yaml LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Loading VAE weights specified in settings: D:\SD\WebUIX\models\VAE\clearvae_variant.safetensors Applying scaled dot product cross attention optimization. Textual inversion embeddings loaded(7): bad_prompt_version2-neg, badhandv4, badv5, easynegative, ng_deepnegative_v1_75t, pureerosface_v1, ulzzang-6500-v1.1 Model loaded in 1.9s (load weights from disk: 0.3s, create model: 0.2s, apply weights to model: 0.6s, apply half(): 0.3s, move model to device: 0.3s). Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch(). Startup time: 8.4s (import torch: 0.9s, import gradio: 0.6s, import ldm: 0.3s, other imports: 1.6s, load scripts: 1.1s, load SD checkpoint: 2.2s, create ui: 1.4s, gradio launch: 0.3s).

anapnoe commented 1 year ago

isn't the default SD VAE Automatic? can you update to last commit?

rushuna86 commented 1 year ago

yes updated to the last commit. And Default VAE is automatic, but if you go into settings>Stable Diffusion and change the VAE in there to something else. It will save that VAE and will load that one up when you start up WebUI.

But since 1.2.0 update console always showing it cannot find VAE named (selected vae), but inside settings/quick setting the named VAE is actually shows as the selected VAE, but isn't actually applied. Have to change to different vae and back for it to be applied. See screenshot. Console shows "Couldn't find VAE named clearvae_variant.safetensors; using None instead", but inside WebUI the VAE that it cannot find shows as the selected VAE on start up, but image generation doesn't use the VAE but is using None like the console says. Have to pick a different VAE and then back to clearvae_variant for it to load it.

https://imgur.com/waHlBo2

anapnoe commented 1 year ago

you shouldn't have 2 SD VAE options there should be only one in settings or quicksettings can you copy your settings to another location and restart ui-ux and add it to quicksettings and try again the new update from upstream mess the quicksettings

rushuna86 commented 1 year ago

still the same. https://imgur.com/tx7Fi6D

This issue isnt because of the recent commits. It's been happening since b08500c

anapnoe commented 1 year ago

Untitled

something is not ok I cant reproduce the issue does your SD VAE show in settings and quicksettings

rushuna86 commented 1 year ago

Nope it shows in one or the other. And yep something is really messed up. I did a brand new pull and another clean install, used my old config.json and it works O_o so weird. didnt work before. i'll try figure it out and if i find out what caused it i'll let u know

rushuna86 commented 1 year ago

@anapnoe https://github.com/vladmandic/sd-extension-system-info