-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Fix for "no lora weight found module" with some loras #7875
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
Fix for "no lora weight found module" with some loras #7875
Conversation
sayakpaul
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
If it's not too much could we maybe add a SLOW test for this too?
It should go here: https://github.com/huggingface/diffusers/blob/main/tests/lora/test_lora_layers_sdxl.py
|
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. |
|
sure, I just noticed that I can make it better so I'll do the test and fix it a little more. |
|
@sayakpaul is this test enough? |
sayakpaul
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is perfect. Thank you!
|
Thanks much @asomoza! |
* return layer weight if not found * better system and test * key example and typo
* return layer weight if not found * better system and test * key example and typo
What does this PR do?
When using some LoRAs, for example sd_xl_offset_example-lora_1.0.safetensors with blockwise scales we get this error:
This PR makes it so if the layer is not found, it returns the weight (scale) of the block enabling the use of these LoRAs with blockwise scales.
e.g.,
down_blocks.0.resnets.0.conv1is not found, returns thescaleof1.0as a default.down_blocks.1.resnets.0.conv1is not found, returns thescaleof0.0down_blocks.1.resnets.1.conv1is not found, returns thescaleof0.5down_blocks.2.resnets.0.conv1is not found, returns thescaleof1.0Fixes #7871
Who can review?
@sayakpaul @yiyixuxu @DN6