Skip to content

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

@mrjchen

Description

@mrjchen

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions