huggingface / diffusers

🤗 Diffusers: State-of-the-art diffusion models for image and audio generation in PyTorch and FLAX.
https://huggingface.co/docs/diffusers
Apache License 2.0
25.18k stars 5.21k forks source link

Unable to convert SSD-1B.safetensors → Diffusers #6689

Open nosferatu500 opened 7 months ago

nosferatu500 commented 7 months ago

Describe the bug

Hi! I'm trying to convert SSD-1B model (link) from SafeTensors to Diffusers

Reproduction

python convert_original_stable_diffusion_to_diffusers.py --checkpoint_path ./models/ssd_1b.safetensors --from_safetensors --device cpu --extract_ema --dump_path ./converted/ssd_1b_diffusers --pipeline_class_name StableDiffusionXLPipeline

Logs

Traceback (most recent call last):
  File "convert_original_stable_diffusion_to_diffusers.py", line 191, in <module>
    pipe = download_from_original_stable_diffusion_ckpt(
  File "/Users/user/miniforge3/envs/coreml_stable_diffusion/lib/python3.8/site-packages/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py", line 1445, in download_from_original_stable_diffusion_ckpt
    converted_unet_checkpoint = convert_ldm_unet_checkpoint(
  File "/Users/user/miniforge3/envs/coreml_stable_diffusion/lib/python3.8/site-packages/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py", line 515, in convert_ldm_unet_checkpoint
    attentions = middle_blocks[1]
KeyError: 1


### System Info

diffusers==0.25.1

python 3.8

macOS 14.3 (M2 Pro)
github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.