diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

Allow users to save SDXL LoRA weights for only one text encoder

Open dulacp opened this issue 2 months ago • 5 comments

What does this PR do?

Allow users to save only the LoRA weights for one text encoder if desired, often used in the Dreambooth realm to avoid overcooking the model too quickly.

Also, the method checks if at least one of unet, text_encoder or text_encoder_2 lora weights is passed, which was not reflected in the implementation.

Before submitting

  • [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • [ ] Did you read the contributor guideline?
  • [ ] Did you read our philosophy doc (important for complex PRs)?
  • [ ] Was this discussed/approved via a GitHub issue or the forum? Please add a link to it if that's the case.
  • [x] Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
  • [ ] Did you write any new necessary tests?

Who can review?

I'm thinking about @sayakpaul since it's a topic close to training examples.

dulacp avatar Apr 08 '24 09:04 dulacp

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.

can you fix the tests?

yiyixuxu avatar Apr 08 '24 18:04 yiyixuxu

ohh the failing test actually might not be relevant here - will take a look on our end!

yiyixuxu avatar Apr 08 '24 18:04 yiyixuxu

Will merge after the CI is green (barring the failing test).

sayakpaul avatar Apr 09 '24 01:04 sayakpaul

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar May 08 '24 15:05 github-actions[bot]

thank you!

yiyixuxu avatar May 08 '24 20:05 yiyixuxu