Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
09675934
Unverified
Commit
09675934
authored
Dec 11, 2024
by
Jonathan Yin
Committed by
GitHub
Dec 11, 2024
Browse files
Fix Nonetype attribute error when loading multiple Flux loras (#10182)
Fix Nonetype attribute error
parent
43534a8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/diffusers/loaders/lora_pipeline.py
src/diffusers/loaders/lora_pipeline.py
+1
-1
No files found.
src/diffusers/loaders/lora_pipeline.py
View file @
09675934
...
@@ -2313,7 +2313,7 @@ class FluxLoraLoaderMixin(LoraBaseMixin):
...
@@ -2313,7 +2313,7 @@ class FluxLoraLoaderMixin(LoraBaseMixin):
for
name
,
module
in
transformer
.
named_modules
():
for
name
,
module
in
transformer
.
named_modules
():
if
isinstance
(
module
,
torch
.
nn
.
Linear
):
if
isinstance
(
module
,
torch
.
nn
.
Linear
):
module_weight
=
module
.
weight
.
data
module_weight
=
module
.
weight
.
data
module_bias
=
module
.
bias
.
data
if
hasattr
(
module
,
"
bias
"
)
else
None
module_bias
=
module
.
bias
.
data
if
module
.
bias
is
not
None
else
None
bias
=
module_bias
is
not
None
bias
=
module_bias
is
not
None
lora_A_weight_name
=
f
"
{
name
}
.lora_A.weight"
lora_A_weight_name
=
f
"
{
name
}
.lora_A.weight"
...
...
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