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
c02f3bae
"git@developer.sourcefind.cn:chenpangpang/ComfyUI.git" did not exist on "fed0a4dd29852e4808382ef9428a2256214667bf"
Commit
c02f3bae
authored
Jul 04, 2023
by
comfyanonymous
Browse files
Now the model merge blocks node will use the longest match.
parent
3a09fac8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
comfy_extras/nodes_model_merging.py
comfy_extras/nodes_model_merging.py
+3
-1
No files found.
comfy_extras/nodes_model_merging.py
View file @
c02f3bae
...
@@ -46,9 +46,11 @@ class ModelMergeBlocks:
...
@@ -46,9 +46,11 @@ class ModelMergeBlocks:
ratio
=
default_ratio
ratio
=
default_ratio
k_unet
=
k
[
len
(
"diffusion_model."
):]
k_unet
=
k
[
len
(
"diffusion_model."
):]
last_arg_size
=
0
for
arg
in
kwargs
:
for
arg
in
kwargs
:
if
k_unet
.
startswith
(
arg
):
if
k_unet
.
startswith
(
arg
)
and
last_arg_size
<
len
(
arg
)
:
ratio
=
kwargs
[
arg
]
ratio
=
kwargs
[
arg
]
last_arg_size
=
len
(
arg
)
m
.
add_patches
({
k
:
(
sd
[
k
],
)},
1.0
-
ratio
,
ratio
)
m
.
add_patches
({
k
:
(
sd
[
k
],
)},
1.0
-
ratio
,
ratio
)
return
(
m
,
)
return
(
m
,
)
...
...
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