Skip to content

Cannot convert SD to diffusers #1979

Closed
Closed
@brurpo

Description

@brurpo

Describe the bug

Trying to convert a ckpt fine tuned from dreambooth (2.1 768) to diffusers yield the following error:
KeyError: 'cond_stage_model.model.text_projection'
This happens either locally or using a space from hugging face:
https://huggingface.co/spaces/diffusers/sd-to-diffusers

Reproduction

You can ask for access to the repo I am trying to convert at
https://huggingface.co/brurpo/sbtbakeoff

Logs

E:\sd\diffusers030\diffusers-0.11.1\diffusers-0.11.1\scripts\convert_original_stable_diffusion_to_diffusers.py  --checkpoint_path "E:\sd\output_gui\sbtbakeoff\model.ckpt" --original_config_file "E:\sd\output_gui\v2-inference-v.yaml"  --image_size 768  --prediction_type v-prediction --upcast_attn True --dump_path "E:\sd\output_gui\sbtbakeoff_sd"
NOTE: Redirects are currently not supported in Windows or MacOs.
A matching Triton is not available, some optimizations will not be enabled.
Error caught was: No module named 'triton'
global_step key not found in model
Traceback (most recent call last):
  File "E:\sd\diffusers030\diffusers-0.11.1\diffusers-0.11.1\scripts\convert_original_stable_diffusion_to_diffusers.py", line 982, in <module>
    text_model = convert_open_clip_checkpoint(checkpoint)
  File "E:\sd\diffusers030\diffusers-0.11.1\diffusers-0.11.1\scripts\convert_original_stable_diffusion_to_diffusers.py", line 751, in convert_open_clip_checkpoint
    d_model = int(checkpoint["cond_stage_model.model.text_projection"].shape[0])
KeyError: 'cond_stage_model.model.text_projection'

System Info

diffusers 0.11.1, sd 2.1 768, python 3.9 locally or huggingface space

Metadata

Metadata

Assignees

No one assigned

    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