couldnt get the vae to work in automatic 111

#6
by GamingDaveUK - opened

I placed the model into the models folder and the vae into the vae folder
renamed the vae to "diffusion_pytorch_model.vae.pt"
It then showed up in settings under vae.
but when you try to load it you get:
Loading VAE weights from: C:\AIArt\SDCmplete\stable-diffusion-webui\models\VAE\diffusion_pytorch_model.vae.pt
Error completing request
Arguments: (True, 'png', '[datetime<%d-%m-%Y_%H%M%S>]-[seed]-[prompt_spaces]', False, True, 'png', False, True, False, -1, True, False, True, False, False, 80, True, False, True, False, 'F:\AiART', 'outputs/txt2img-images', 'outputs/img2img-images', 'outputs/extras-images', '', 'outputs/txt2img-grids', 'outputs/img2img-grids', 'log/images', False, False, False, '', 8, 192, 8, ['R-ESRGAN x4+', 'R-ESRGAN x4+ Anime6B', 'R-ESRGAN General 4xV3'], 192, 8, 100, None, False, 'CodeFormer', 0.5, False, 8, False, True, False, False, 0, False, '', ' ', 1, 500.0, False, None, 0, 'diffusion_pytorch_model.vae', 'None', 1, 1, False, False, False, True, False, True, 20, False, 1, ['nudity', 'anime', 'special', 'weird'], False, True, False, 1, 24, 48, 1500.0, 0.5, True, False, True, True, 0, True, True, False, True, False, False, True, '', True, True, True, 'sd_model_checkpoint', 'None', [], 0, 1, 'uniform', 0, 0, 1, 0, None, False, 6.0, 6.0, 20.0, 4, 4, 6) {}
Traceback (most recent call last):
File "C:\AIArt\SDCmplete\stable-diffusion-webui\modules\ui.py", line 185, in f
res = list(func(*args, **kwargs))
File "C:\AIArt\SDCmplete\stable-diffusion-webui\modules\ui.py", line 1483, in run_settings
opts.data_labels[key].onchange()
File "C:\AIArt\SDCmplete\stable-diffusion-webui\webui.py", line 41, in f
res = func(*args, **kwargs)
File "C:\AIArt\SDCmplete\stable-diffusion-webui\webui.py", line 84, in
shared.opts.onchange("sd_vae", wrap_queued_call(lambda: modules.sd_vae.reload_vae_weights()), call=False)
File "C:\AIArt\SDCmplete\stable-diffusion-webui\modules\sd_vae.py", line 198, in reload_vae_weights
load_vae(sd_model, vae_file)
File "C:\AIArt\SDCmplete\stable-diffusion-webui\modules\sd_vae.py", line 144, in load_vae
vae_dict_1 = {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'

I am very new to all this so I may have made a newbie mistake?

Wait, do we need the vae file to make it work?

@GamingDaveUK
For A1111's web-ui you should use the "mdjrny-v4.ckpt" from the main folder of this repository, as it was compiled with the vae built in.

/vae/diffusion_pytorch_model.vae is meant for using the /unet/diffusion_pytorch_model.bin directly in huggingface's diffusers library.

prompthero changed discussion status to closed

Sign up or log in to comment