bmaltais / kohya_ss

Apache License 2.0
9.54k stars 1.23k forks source link

KeyError: 'time_embed.0.weight' #774

Closed UnstableJail closed 8 months ago

UnstableJail commented 1 year ago

I reinstalled everything several times. I have no idea what'S causing this error. Can anyone please help ?

The error: To create a public link, set share=True in launch(). ./venv/Scripts/python.exe "networks\extract_lora_from_models.py" --save_precision fp16 --save_to "C:/Users/paulv/stable-diffusion-webui/models/Lora/under.safetensors" --model_org "C:/Users/paulv/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned.safetensors" --model_tuned "C:/Users/paulv/stable-diffusion-webui/models/Stable-diffusion/UnderV1.safetensors" --dim 128 --device cuda --conv_dim 128 loading SD model : C:/Users/paulv/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned.safetensors loading u-net: loading vae: loading text encoder: loading SD model : C:/Users/paulv/stable-diffusion-webui/models/Stable-diffusion/UnderV1.safetensors Traceback (most recent call last): File "C:\Users\paulv\kohya_ss\networks\extract_lora_from_models.py", line 189, in svd(args) File "C:\Users\paulv\kohya_ss\networks\extract_lora_from_models.py", line 45, in svd text_encodert, , unet_t = model_util.load_models_from_stable_diffusion_checkpoint(args.v2, args.model_tuned) File "C:\Users\paulv\kohya_ss\venv\lib\site-packages\library\model_util.py", line 860, in load_models_from_stable_diffusion_checkpoint converted_unet_checkpoint = convert_ldm_unet_checkpoint(v2, state_dict, unet_config) File "C:\Users\paulv\kohya_ss\venv\lib\site-packages\library\model_util.py", line 236, in convert_ldm_unet_checkpoint new_checkpoint["time_embedding.linear_1.weight"] = unet_state_dict["time_embed.0.weight"] KeyError: 'time_embed.0.weight'

bmaltais commented 1 year ago

Does it do that with all checkpoint or just UnderV1.safetensors?

UnstableJail commented 1 year ago

With all of them

UnstableJail commented 1 year ago

Right now I am installing Linux because I am so frustrated. Hopefully it works with another OS

AdinLee09 commented 1 year ago

Same here

izz-j commented 1 year ago

I have really been trying to fix this error. All requirements satisfied. Updates did not work. I am running it on linux. Has to be an issue with the code that loads the model.

abhijeeth-sdapi commented 1 year ago

have you mentioned your trained model in there