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
fengzch-das
nunchaku
Commits
65d7e47a
"vscode:/vscode.git/clone" did not exist on "3f0569939c4369bec943fc27d1c9d8dfbc828c26"
Commit
65d7e47a
authored
Mar 18, 2025
by
Muyang Li
Committed by
Zhekai Zhang
Apr 01, 2025
Browse files
support fluxgym loras
parent
1eb6352a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
nunchaku/lora/flux/comfyui_converter.py
nunchaku/lora/flux/comfyui_converter.py
+1
-1
nunchaku/lora/flux/utils.py
nunchaku/lora/flux/utils.py
+1
-1
No files found.
nunchaku/lora/flux/comfyui_converter.py
View file @
65d7e47a
...
@@ -19,7 +19,7 @@ def comfyui2diffusers(
...
@@ -19,7 +19,7 @@ def comfyui2diffusers(
new_tensors
=
{}
new_tensors
=
{}
max_rank
=
0
max_rank
=
0
for
k
,
v
in
tensors
.
items
():
for
k
,
v
in
tensors
.
items
():
if
"alpha"
in
k
:
if
"alpha"
in
k
or
"lora_te"
in
k
:
continue
continue
new_k
=
k
.
replace
(
"lora_down"
,
"lora_A"
).
replace
(
"lora_up"
,
"lora_B"
)
new_k
=
k
.
replace
(
"lora_down"
,
"lora_A"
).
replace
(
"lora_up"
,
"lora_B"
)
if
"lora_unet_double_blocks_"
in
k
:
if
"lora_unet_double_blocks_"
in
k
:
...
...
nunchaku/lora/flux/utils.py
View file @
65d7e47a
...
@@ -12,7 +12,7 @@ def detect_format(lora: str | dict[str, torch.Tensor]) -> str:
...
@@ -12,7 +12,7 @@ def detect_format(lora: str | dict[str, torch.Tensor]) -> str:
for
k
in
tensors
.
keys
():
for
k
in
tensors
.
keys
():
if
"lora_unet_double_blocks_"
in
k
or
"lora_unet_single_blocks"
in
k
:
if
"lora_unet_double_blocks_"
in
k
or
"lora_unet_single_blocks"
in
k
:
return
"comfyui"
return
"comfyui"
elif
"mlp_fc"
in
k
or
"mlp_context_fc1"
in
k
:
elif
"
.
mlp_fc"
in
k
or
"mlp_context_fc1"
in
k
:
return
"svdquant"
return
"svdquant"
elif
"double_blocks."
in
k
or
"single_blocks."
in
k
:
elif
"double_blocks."
in
k
or
"single_blocks."
in
k
:
return
"xlab"
return
"xlab"
...
...
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