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

Unexpected key(s) in state_dict: "text_model.embeddings.position_ids". #46

Open
mrjchen opened this issue Aug 30, 2023 · 1 comment
Open

Comments

@mrjchen
Copy link

mrjchen commented Aug 30, 2023

Sorry to bother you.When i try to python ./scripts/convert_controlnet_to_diffusers.py --checkpoint_path ../models/control_any3_openpose.pth --dump_path control_any3_openpose --device cpu. Something went wrong.
global_step key not found in model
Traceback (most recent call last):
File "./scripts/convert_controlnet_to_diffusers.py", line 105, in
pipe = load_pipeline_from_control_net_ckpt(
File "/home/jjc/anaconda3/envs/m3/lib/python3.8/site-packages/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py", line 1566, in load_pipeline_from_control_net_ckpt
text_model = convert_ldm_clip_checkpoint(checkpoint)
File "/home/jjc/anaconda3/envs/m3/lib/python3.8/site-packages/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py", line 847, in convert_ldm_clip_checkpoint
text_model.load_state_dict(text_model_dict)
File "/home/jjc/anaconda3/envs/m3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1482, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for CLIPTextModel:
Unexpected key(s) in state_dict: "text_model.embeddings.position_ids".

@Awj2021
Copy link

Awj2021 commented May 15, 2024

Hi I have the same error, can you share how do you solve it? Thanks.

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