Skip to content
This repository was archived by the owner on Jan 9, 2024. It is now read-only.

Commit 9a49da2

Browse files
committed
feat: make cnet_stack optional
1 parent ca3f5ae commit 9a49da2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

efficiency_nodes.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,16 +358,19 @@ class TSC_Apply_ControlNet_Stack:
358358
@classmethod
359359
def INPUT_TYPES(cls):
360360
return {"required": {"positive": ("CONDITIONING",),
361-
"negative": ("CONDITIONING",),
362-
"cnet_stack": ("CONTROL_NET_STACK",)},
361+
"negative": ("CONDITIONING",)},
362+
"optional": {"cnet_stack": ("CONTROL_NET_STACK",)}
363363
}
364364

365365
RETURN_TYPES = ("CONDITIONING","CONDITIONING",)
366366
RETURN_NAMES = ("CONDITIONING+","CONDITIONING-",)
367367
FUNCTION = "apply_cnet_stack"
368368
CATEGORY = "Efficiency Nodes/Stackers"
369369

370-
def apply_cnet_stack(self, positive, negative, cnet_stack):
370+
def apply_cnet_stack(self, positive, negative, cnet_stack=None):
371+
if cnet_stack is None:
372+
return (positive, negative)
373+
371374
for control_net_tuple in cnet_stack:
372375
control_net, image, strength, start_percent, end_percent = control_net_tuple
373376
controlnet_conditioning = ControlNetApplyAdvanced().apply_controlnet(positive, negative,

0 commit comments

Comments
 (0)