Skip to content

[docs] Load A1111 LoRA #3629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 5, 2023
Merged

[docs] Load A1111 LoRA #3629

merged 4 commits into from
Jun 5, 2023

Conversation

stevhliu
Copy link
Member

@stevhliu stevhliu commented Jun 1, 2023

A guide for how to load and use an A1111 LoRA checkpoint with load_lora_weights (to be merged after the ongoing PR that adds support for it).

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 1, 2023

The documentation is not available anymore as the PR was closed or merged.

@junjiexv
Copy link

junjiexv commented Jun 1, 2023

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

the link is broken, @HuggingFaceDocBuilderDev

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @sayakpaul @takuma104 could you have a look here? :-)

@takuma104
Copy link
Contributor

@stevhliu I've left a comment, although it might be a bit nitpicky. For the example image, it's a beautiful and easy-to-understand!

@stevhliu
Copy link
Member Author

stevhliu commented Jun 2, 2023

Thanks for your feedback (and contributions in general) @takuma104! 🤗


```py
pipeline.load_lora_weights(".", weight_name="howls_moving_castle.safetensors")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, possible directly load like:

lora_model_id = "sayakpaul/civitai-light-shadow-lora"
lora_filename = "light_and_shadow.safetensors"
pipeline.load_lora_weights(lora_model_id, weight_name=lora_filename)

C.f.: https://huggingface.co/docs/diffusers/main/en/training/lora#supporting-a1111-themed-lora-checkpoints-from-diffusers


<div class="flex justify-center">
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/a1111-lora-sf.png"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The picture is amazing 💘

I also included a with and with LoRA comparison here.

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work, @stevhliu!

@sayakpaul sayakpaul merged commit 523a50a into huggingface:main Jun 5, 2023
@stevhliu stevhliu deleted the a1111-format branch June 5, 2023 15:52
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
* load a1111 lora

* fix

* apply feedback

* fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants