Skip to content

error converting controlnet safetensors file to diffusers #2774

@goodspb

Description

@goodspb

Describe the bug

Hi, I try to convert safetensors file using convert_original_controlnet_to_diffusers.py, but still got errors like:

new_checkpoint["time_embedding.linear_1.weight"] = unet_state_dict["time_embed.0.weight"]

but converting ckpt is fine.

Reproduction

python3 ~/diffusers/scripts/convert_original_controlnet_to_diffusers.py \
  --checkpoint_path ~/control-net/model/openpose-sd21.safetensors \
  --original_config_file ~/control-net/model/cldm_v21.yaml \
  --from_safetensors \
  --device cuda --dump_path ~/control-net/diffuser-model/openpose-sd21

Logs

error log:

`new_checkpoint["time_embedding.linear_1.weight"] = unet_state_dict["time_embed.0.weight"]`

System Info

I am using the main branch of diffusers, commit id: fdcff56

diffusers-cli env

Copy-and-paste the text below in your GitHub issue and FILL OUT the two last points.

  • diffusers version: 0.15.0.dev0
  • Platform: Linux-5.15.0-1022-aws-x86_64-with-glibc2.35
  • Python version: 3.10.6
  • PyTorch version (GPU?): 2.0.0+cu117 (True)
  • Huggingface_hub version: 0.13.2
  • Transformers version: 4.27.1
  • Accelerate version: 0.17.1
  • xFormers version: 0.0.16+6f3c20f.d20230320
  • Using GPU in script?:
  • Using distributed or parallel set-up in script?:

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingstaleIssues that haven't received updates

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions