Open moo611 opened 11 months ago
Any Idea on how you fixed it ?
i changed base model and it worked
Also running into this... any fix?
Just ran into this issue while loading a UNet2DModel I fine-tuned.
pipe = StableDiffusionPipeline.from_single_file("/train3/unet/diffusion_pytorch_model.safetensors")
is causing issue.
diffusers version : 0.18.2 code :
I run this on the google colab, but I got the error: KeyError: 'time_embed.0.weight'. I will give the whole error message below:
`
KeyError Traceback (most recent call last) in <cell line: 3>()
1 from torch import autocast
2 from diffusers import StableDiffusionPipeline
----> 3 pipeline = StableDiffusionPipeline.from_single_file("https://huggingface.co/xiaolxl/GuoFeng3/blob/main/GuoFeng3.2_Lora.safetensors")
4 pipeline.to("cuda")
5 with autocast("cuda"):
2 frames /usr/local/lib/python3.10/dist-packages/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py in convert_ldm_unet_checkpoint(checkpoint, config, path, extract_ema, controlnet, skip_extract_state_dict) 419 new_checkpoint = {} 420 --> 421 new_checkpoint["time_embedding.linear_1.weight"] = unet_state_dict["time_embed.0.weight"] 422 new_checkpoint["time_embedding.linear_1.bias"] = unet_state_dict["time_embed.0.bias"] 423 new_checkpoint["time_embedding.linear_2.weight"] = unet_state_dict["time_embed.2.weight"]
KeyError: 'time_embed.0.weight' `