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] Revert original behavior for scale / unscale #1029

Merged
merged 3 commits into from
Oct 16, 2023

Conversation

younesbelkada
Copy link
Contributor

@younesbelkada younesbelkada commented Oct 16, 2023

What does this PR do?

Partially fixes huggingface/diffusers#5414 - fix proposed by @BenjaminBossan

A fix is going to be upstreamed on diffusers as well

For unscaling, we can use a new argument to divide back the current scale with the scale argument, if no scale is passed, self.scale[adapter_name] will be retrieved back to its original value.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 16, 2023

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

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 the fix, most excellent code ;)

We should also make the change to LoHa, but it could be a different PR. Also, we should eventually add tests for scaling. Right now, it is only indirectly tested through diffusers.

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.

[PEFT] set_adapters with weights argument currently broken
3 participants