Skip to content

Conversation

@younesbelkada
Copy link
Contributor

@younesbelkada younesbelkada commented Sep 27, 2023

What does this PR do?

Addresses the first comment of #5151 (review)

1- removes the use_peft_backend argument from adjust_lora_scale_text_encoder
2- Calls scale_lora_layers / unscale_lora_layers on encode_prompt for StableDiffusionPipeline and StableDiffusionXLPipeline
3- make fix-copies

All tests pass and I made sure the generate image is the same with and without scale argument from main.

cc @patrickvonplaten @sayakpaul

@patrickvonplaten
Copy link
Contributor

PR looks good but many tests are failing - can you take a look here @younesbelkada ?

@younesbelkada
Copy link
Contributor Author

Thanks! Should be fixed now!

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.

Let's merge this one once the tests are green

@patrickvonplaten patrickvonplaten merged commit cc92332 into huggingface:main Sep 29, 2023
chuzhdontcode pushed a commit to chuzhdontcode/diffusers that referenced this pull request Oct 4, 2023
* move text encoder changes

* fix

* add comment.

* fix tests

* Update src/diffusers/utils/peft_utils.py

---------

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* move text encoder changes

* fix

* add comment.

* fix tests

* Update src/diffusers/utils/peft_utils.py

---------

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
* move text encoder changes

* fix

* add comment.

* fix tests

* Update src/diffusers/utils/peft_utils.py

---------

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
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.

2 participants