Skip to content

Loading CivitAI Lora #4773

Closed
Closed
@MaxTran96

Description

@MaxTran96

Describe the bug

According to https://github.com/huggingface/diffusers/releases/tag/v0.19.2, i can load Lora by

pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16)
pipe.load_lora_weights("stabilityai/stable-diffusion-xl-base-1.0", weight_name="sd_xl_offset_example-lora_1.0.safetensors")
pipe.to("cuda")

but in #4287
you wrote

from diffusers import DiffusionPipeline
import torch
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16)
pipe.load_lora_weights("./sd_xl_offset_example-lora_1.0.safetensors")

Are these identical?

pipe.load_lora_weights("stabilityai/stable-diffusion-xl-base-1.0", weight_name="sd_xl_offset_example-lora_1.0.safetensors")
pipe.to("cuda")

and

pipe.load_lora_weights("./sd_xl_offset_example-lora_1.0.safetensors")

Does that mean i can also load any civitai lora model? Do i need to download and put this in local path? Can i reference it by url and load it from there similar to huggingface model_id? How do you suggest i should load lora weight from civitai? i.e https://civitai.com/models/112902/dreamshaper-xl10

@patrickvonplaten

Reproduction

N/A

Logs

No response

System Info

ec2

Who can help?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions