stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

vae loading error [Bug]:

Open 1blackbar opened this issue 3 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

To create a public link, set share=True in launch(). Loading weights [a2a802b2] from D:\sd\models\Stable-diffusion\male-kry-2400-25im.ckpt Loading VAE weights from: D:\sd\models\Stable-diffusion\male-kry-2400-25im.vae.pt Traceback (most recent call last): File "D:\sd\venv\lib\site-packages\gradio\routes.py", line 275, in run_predict output = await app.blocks.process_api( File "D:\sd\venv\lib\site-packages\gradio\blocks.py", line 787, in process_api result = await self.call_function(fn_index, inputs, iterator) File "D:\sd\venv\lib\site-packages\gradio\blocks.py", line 694, in call_function prediction = await anyio.to_thread.run_sync( File "D:\sd\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "D:\sd\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "D:\sd\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "D:\sd\modules\ui.py", line 1736, in fn=lambda value, k=k: run_settings_single(value, key=k), File "D:\sd\modules\ui.py", line 1591, in run_settings_single opts.data_labels[key].onchange() File "D:\sd\webui.py", line 40, in f res = func(*args, **kwargs) File "D:\sd\webui.py", line 85, in shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights(shared.sd_model))) File "D:\sd\modules\sd_models.py", line 265, in reload_model_weights load_model_weights(sd_model, checkpoint_info) File "D:\sd\modules\sd_models.py", line 192, in load_model_weights vae_dict = {k: v for k, v in vae_ckpt["state_dict"].items() if k[0:4] != "loss" and k not in vae_ignore_keys} KeyError: 'state_dict'

Steps to reproduce the problem

download vae from huggingface (about 300mb) rename it to "modelname.vae.pt" load webui, error above shows up

What should have happened?

should load it without error , i think vae is supported in todays repo ?

Commit where the problem happens

today from minute ago

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

none

Additional information, context and logs

displays ERROR in red where modelslist is, doesnt load the model, but even it cant load vae, i dont think it shoudld totally flack like this and not load model at all, displaying info that vae error happened should be enough and load it without vae if theres still no support.

1blackbar avatar Oct 21 '22 18:10 1blackbar

You might have downloaded the wrong model. You need to download from sd-vae-ft-mse-original rather than sd-vae-ft-mse (which is for diffusers)

litevex avatar Oct 22 '22 11:10 litevex

@1blackbar Just pass the full path to the checkpoint file and it should work. You are probably passing a directory --vae-path ${WHATEVER}/sd-vae-ft-mse-original/vae-ft-mse-840000-ema-pruned.ckpt

innokean avatar Oct 23 '22 23:10 innokean

Seemingly an invalid file and not an issue with processing vaes

dfaker avatar Oct 26 '22 10:10 dfaker