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
chenpangpang
ComfyUI
Commits
b7c473d1
"...src/routers/git@developer.sourcefind.cn:change/sglang.git" did not exist on "be059b83d6684fc0cfe005fb62b5a857e164536a"
Unverified
Commit
b7c473d1
authored
Jun 17, 2024
by
Janek Mann
Committed by
GitHub
Jun 17, 2024
Browse files
Fix lora keys for SimpleTuner (#3759)
parent
6425252c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
comfy/lora.py
comfy/lora.py
+5
-0
No files found.
comfy/lora.py
View file @
b7c473d1
...
@@ -30,6 +30,7 @@ def load_lora(lora, to_load):
...
@@ -30,6 +30,7 @@ def load_lora(lora, to_load):
regular_lora
=
"{}.lora_up.weight"
.
format
(
x
)
regular_lora
=
"{}.lora_up.weight"
.
format
(
x
)
diffusers_lora
=
"{}_lora.up.weight"
.
format
(
x
)
diffusers_lora
=
"{}_lora.up.weight"
.
format
(
x
)
diffusers2_lora
=
"{}.lora_B.weight"
.
format
(
x
)
diffusers2_lora
=
"{}.lora_B.weight"
.
format
(
x
)
diffusers3_lora
=
"{}.lora.up.weight"
.
format
(
x
)
transformers_lora
=
"{}.lora_linear_layer.up.weight"
.
format
(
x
)
transformers_lora
=
"{}.lora_linear_layer.up.weight"
.
format
(
x
)
A_name
=
None
A_name
=
None
...
@@ -45,6 +46,10 @@ def load_lora(lora, to_load):
...
@@ -45,6 +46,10 @@ def load_lora(lora, to_load):
A_name
=
diffusers2_lora
A_name
=
diffusers2_lora
B_name
=
"{}.lora_A.weight"
.
format
(
x
)
B_name
=
"{}.lora_A.weight"
.
format
(
x
)
mid_name
=
None
mid_name
=
None
elif
diffusers3_lora
in
lora
.
keys
():
A_name
=
diffusers3_lora
B_name
=
"{}.lora.down.weight"
.
format
(
x
)
mid_name
=
None
elif
transformers_lora
in
lora
.
keys
():
elif
transformers_lora
in
lora
.
keys
():
A_name
=
transformers_lora
A_name
=
transformers_lora
B_name
=
"{}.lora_linear_layer.down.weight"
.
format
(
x
)
B_name
=
"{}.lora_linear_layer.down.weight"
.
format
(
x
)
...
...
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