Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
diffusers
Commits
5b51ad00
Unverified
Commit
5b51ad00
authored
Jun 26, 2024
by
Sayak Paul
Committed by
GitHub
Jun 26, 2024
Browse files
[LoRA] fix vanilla fine-tuned lora loading. (#8691)
fix vanilla fine-tuned lora loading.
parent
10b4e354
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
src/diffusers/loaders/lora.py
src/diffusers/loaders/lora.py
+1
-2
No files found.
src/diffusers/loaders/lora.py
View file @
5b51ad00
...
...
@@ -396,8 +396,7 @@ class LoraLoaderMixin:
# their prefixes.
keys
=
list
(
state_dict
.
keys
())
only_text_encoder
=
all
(
key
.
startswith
(
cls
.
text_encoder_name
)
for
key
in
keys
)
if
any
(
key
.
startswith
(
cls
.
unet_name
)
for
key
in
keys
)
and
not
only_text_encoder
:
if
not
only_text_encoder
:
# Load the layers corresponding to UNet.
logger
.
info
(
f
"Loading
{
cls
.
unet_name
}
."
)
unet
.
load_attn_procs
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment