-
Notifications
You must be signed in to change notification settings - Fork 6.1k
[Lora] fix lora fuse unfuse #5003
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It works! |
Found another case where it fails: pipe.load_lora_weights("Pclanglais/TintinIA")
pipe.fuse_lora()
pipe.unfuse_lora()
pipe.unload_lora_weights()
pipe.load_lora_weights("ProomptEngineer/pe-balloon-diffusion-style")
pipe.fuse_lora()
pipe.unload_lora_weights()
pipe.unfuse_lora()
pipe.load_lora_weights("ostris/crayon_style_lora_sdxl")
pipe.fuse_lora()
pipe.unload_lora_weights()
pipe.unfuse_lora() The error seems the same but on ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-5-545257b7c3f8>](https://localhost:8080/#) in <cell line: 14>()
12 pipe.fuse_lora()
13 pipe.unload_lora_weights()
---> 14 pipe.unfuse_lora()
2 frames
[/usr/local/lib/python3.10/dist-packages/diffusers/loaders.py](https://localhost:8080/#) in _unfuse_lora(self)
127 dtype, device = fused_weight.dtype, fused_weight.device
128
--> 129 w_up = self.w_up.to(device=device).float()
130 w_down = self.w_down.to(device).float()
131
AttributeError: 'NoneType' object has no attribute 'to' |
Sweet this seems to be fixed no? I'll add a quick test and then we can merge this I think |
Yes I added the same fix to |
Cool, this one should be good to merge then |
The documentation is not available anymore as the PR was closed or merged. |
patrickvonplaten
added a commit
that referenced
this pull request
Sep 29, 2023
* fix lora fuse unfuse * add same changes to loaders.py * add test --------- Co-authored-by: multimodalart <[email protected]>
yoonseokjin
pushed a commit
to yoonseokjin/diffusers
that referenced
this pull request
Dec 25, 2023
* fix lora fuse unfuse * add same changes to loaders.py * add test --------- Co-authored-by: multimodalart <[email protected]>
AmericanPresidentJimmyCarter
pushed a commit
to AmericanPresidentJimmyCarter/diffusers
that referenced
this pull request
Apr 26, 2024
* fix lora fuse unfuse * add same changes to loaders.py * add test --------- Co-authored-by: multimodalart <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes sequentially fusing & unfusing LoRAs.
Fixes: #5000