Skip to content

Converting lora .safetensors to diffusers #3045

@tentothedollar1

Description

@tentothedollar1

Describe the bug

Hi there,

I'm trying to convert a civitai model to diffusers format using this script in your repository: https://github.com/huggingface/diffusers/blob/main/scripts/convert_lora_safetensor_to_diffusers.py

I'm trying to convert the file like this:

python convert.py --checkpoint_path /Users/isaac/Desktop/convert/model.safetensors --dump_path /Users/isaac/Desktop/convert --base_model_path stabilityai/stable-diffusion-2-1

But after a while running I get the error: ""AttributeError: 'CLIPTextModel' object has no attribute 'cond_stage_model'".

I'm not super good with this stuff so a wiki on how to use these convert scripts would be useful. Am I calling the command correctly? Is the base_model_path supposed to be a huggingface path like "stabilityai/stable-diffusion-2-1" or is that wrong?

Would appreciate any help. Thanks

I'm running on a Mac OS.

Reproduction

Try to convert .safetensors on a Mac OS, using the command

python convert.py --checkpoint_path /Users/isaac/Desktop/convert/model.safetensors --dump_path /Users/isaac/Desktop/convert --base_model_path stabilityai/stable-diffusion-2-1

Logs

No response

System Info

Mac Os, Python 3.11.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleIssues that haven't received updates

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions