Skip to content
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

[LoRA PEFT] fix LoRA loading so that correct alphas are parsed #6225

Merged
merged 9 commits into from
Dec 24, 2023

Conversation

sayakpaul
Copy link
Member

@sayakpaul sayakpaul commented Dec 19, 2023

What does this PR do?

Simplifies #6135

Fixes #6087

Do go through #6135 (comment) for the full context.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@pacman100 pacman100 left a comment

Choose a reason for hiding this comment

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

Hello Sayak, thank you for the fixes to be inline with the pre PEFT integration without the need to save the config. I have shared some comments offline wrt tests of the PR.

Copy link
Member

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

Thanks for making the adjustments!

Do we need to update the following scripts too?

  • examples/wuerstchen/text_to_image/train_text_to_image_lora_prior.py
  • examples/research_projects/lora/train_text_to_image_lora.py
  • examples/consistency_distillation/train_lcm_distill_lora_sdxl_wds.py
  • examples/consistency_distillation/train_lcm_distill_lora_sd_wds.py

(possibly also with regard to init_lora_weights="gaussian")

@sayakpaul
Copy link
Member Author

sayakpaul commented Dec 19, 2023

For examples/wuerstchen/text_to_image/train_text_to_image_lora_prior.py, I will defer to @kashif. We can skip anything under research_projects as those are not maintained by us.

For the LCM stuff, I will reflect them in #5778. Very nice catch :)

@kashif
Copy link
Contributor

kashif commented Dec 19, 2023

checking thanks for the heads up!

Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

Thanks a lot Sayak!

@sayakpaul sayakpaul merged commit 90b9479 into main Dec 24, 2023
16 checks passed
@sayakpaul sayakpaul deleted the fix/alpha-mismatch-lora-peft branch December 24, 2023 04:29
donhardman pushed a commit to donhardman/diffusers that referenced this pull request Dec 29, 2023
…ngface#6225)

* initialize alpha too.

* add: test

* remove config parsing

* store rank

* debug

* remove faulty test
antoine-scenario pushed a commit to antoine-scenario/diffusers that referenced this pull request Jan 2, 2024
…ngface#6225)

* initialize alpha too.

* add: test

* remove config parsing

* store rank

* debug

* remove faulty test
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
…ngface#6225)

* initialize alpha too.

* add: test

* remove config parsing

* store rank

* debug

* remove faulty test
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.

diffusers doesn't save and load the LoraConfig, resulting wrong lora_alpha during inference.
7 participants