Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用ckpt2diffusers.py转ckpt时出错 #15

Open
imccainiao opened this issue Jun 28, 2023 · 1 comment
Open

用ckpt2diffusers.py转ckpt时出错 #15

imccainiao opened this issue Jun 28, 2023 · 1 comment

Comments

@imccainiao
Copy link

RuntimeError: Error(s) in loading state_dict for AutoencoderKL:
Missing key(s) in state_dict:
"encoder.mid_block.attentions.0.to_q.weight",
"encoder.mid_block.attentions.0.to_q.bias",
"encoder.mid_block.attentions.0.to_k.weight",
"encoder.mid_block.attentions.0.to_k.bias",
"encoder.mid_block.attentions.0.to_v.weight",
"encoder.mid_block.attentions.0.to_v.bias",
"encoder.mid_block.attentions.0.to_out.0.weight",
"encoder.mid_block.attentions.0.to_out.0.bias",
"decoder.mid_block.attentions.0.to_q.weight",
"decoder.mid_block.attentions.0.to_q.bias",
"decoder.mid_block.attentions.0.to_k.weight",
"decoder.mid_block.attentions.0.to_k.bias",
"decoder.mid_block.attentions.0.to_v.weight",
"decoder.mid_block.attentions.0.to_v.bias",
"decoder.mid_block.attentions.0.to_out.0.weight",
"decoder.mid_block.attentions.0.to_out.0.bias".
Unexpected key(s) in state_dict:
"encoder.mid_block.attentions.0.query.weight",
"encoder.mid_block.attentions.0.query.bias",
"encoder.mid_block.attentions.0.key.weight",
"encoder.mid_block.attentions.0.key.bias",
"encoder.mid_block.attentions.0.value.weight",
"encoder.mid_block.attentions.0.value.bias",
"encoder.mid_block.attentions.0.proj_attn.weight",
"encoder.mid_block.attentions.0.proj_attn.bias",
"decoder.mid_block.attentions.0.query.weight",
"decoder.mid_block.attentions.0.query.bias",
"decoder.mid_block.attentions.0.key.weight",
"decoder.mid_block.attentions.0.key.bias",
"decoder.mid_block.attentions.0.value.weight",
"decoder.mid_block.attentions.0.value.bias",
"decoder.mid_block.attentions.0.proj_attn.weight",
"decoder.mid_block.attentions.0.proj_attn.bias".

@OranHe
Copy link

OranHe commented Jul 19, 2023

我也遇到了一样的问题,通过修改vae.load_state_dict(converted_vae_checkpoint)为vae.load_state_dict(converted_vae_checkpoint, strict=False)解决

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

No branches or pull requests

2 participants