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
4d1ed829
Commit
4d1ed829
authored
May 26, 2023
by
space-nuko
Browse files
Don't load some model types if weight is zero
parent
eb4bd771
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
nodes.py
nodes.py
+9
-0
No files found.
nodes.py
View file @
4d1ed829
...
...
@@ -426,6 +426,9 @@ class LoraLoader:
CATEGORY
=
"loaders"
def
load_lora
(
self
,
model
,
clip
,
lora_name
,
strength_model
,
strength_clip
):
if
strength_model
==
0
and
strength_clip
==
0
:
return
(
model
,
clip
)
lora_path
=
folder_paths
.
get_full_path
(
"loras"
,
lora_name
)
model_lora
,
clip_lora
=
comfy
.
sd
.
load_lora_for_models
(
model
,
clip
,
lora_path
,
strength_model
,
strength_clip
)
return
(
model_lora
,
clip_lora
)
...
...
@@ -507,6 +510,9 @@ class ControlNetApply:
CATEGORY
=
"conditioning"
def
apply_controlnet
(
self
,
conditioning
,
control_net
,
image
,
strength
):
if
strength
==
0
:
return
(
conditioning
,
)
c
=
[]
control_hint
=
image
.
movedim
(
-
1
,
1
)
for
t
in
conditioning
:
...
...
@@ -613,6 +619,9 @@ class unCLIPConditioning:
CATEGORY
=
"conditioning"
def
apply_adm
(
self
,
conditioning
,
clip_vision_output
,
strength
,
noise_augmentation
):
if
strength
==
0
:
return
(
conditioning
,
)
c
=
[]
for
t
in
conditioning
:
o
=
t
[
1
].
copy
()
...
...
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