Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

KeyError: 'state_dict' #54

Closed
brookman opened this issue Aug 28, 2022 · 3 comments
Closed

KeyError: 'state_dict' #54

brookman opened this issue Aug 28, 2022 · 3 comments

Comments

@brookman
Copy link

I tried to copy the weights from "stable-diffusion-v1-4/unet/diffusion_pytorch_model.bin" to models/ldm/stable-diffusion-v1/model.ckpt and run webuildm.cmd on windows but I'm getting the following error:

Loaded GFPGAN
Loaded RealESRGAN with model RealESRGAN_x4plus
Loading model from models/ldm/stable-diffusion-v1/model.ckpt
Traceback (most recent call last):
  File "scripts/webui.py", line 344, in <module>
    model = load_model_from_config(config, "models/ldm/stable-diffusion-v1/model.ckpt")
  File "scripts/webui.py", line 123, in load_model_from_config
    sd = pl_sd["state_dict"]
KeyError: 'state_dict'
Relauncher: Process is ending. Relaunching in 0.5s...

Is that even the correct file?

@JoshuaKimsey
Copy link

I don't think you have the correct model/model file. The correct download should be sd-v1-4.ckpt. That is what you rename to model.ckpt and put into models/ldm/stable-diffusion-v1.

@hlky
Copy link

hlky commented Aug 28, 2022

stable-diffusion-v1-4/unet/diffusion_pytorch_model.bin
@JoshuaKimsey is correct this is the wrong file

@hlky hlky closed this as completed Aug 28, 2022
@brookman
Copy link
Author

@JoshuaKimsey Thank you very much for the clarification. I was searching in the repo stable-diffusion-v1-4 instead of this one: diffusion-v-1-4-original. You might consider adding a hint to the docs.

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

No branches or pull requests

3 participants