mirror of
https://github.com/jags111/efficiency-nodes-comfyui.git
synced 2026-03-21 21:22:13 -03:00
Merge pull request #189 from philhk/optional-cnet_stack
Optional ControlNet Stack
This commit is contained in:
@@ -369,8 +369,8 @@ class TSC_Apply_ControlNet_Stack:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {"required": {"positive": ("CONDITIONING",),
|
||||
"negative": ("CONDITIONING",),
|
||||
"cnet_stack": ("CONTROL_NET_STACK",)},
|
||||
"negative": ("CONDITIONING",)},
|
||||
"optional": {"cnet_stack": ("CONTROL_NET_STACK",)}
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("CONDITIONING","CONDITIONING",)
|
||||
@@ -378,7 +378,10 @@ class TSC_Apply_ControlNet_Stack:
|
||||
FUNCTION = "apply_cnet_stack"
|
||||
CATEGORY = "Efficiency Nodes/Stackers"
|
||||
|
||||
def apply_cnet_stack(self, positive, negative, cnet_stack):
|
||||
def apply_cnet_stack(self, positive, negative, cnet_stack=None):
|
||||
if cnet_stack is None:
|
||||
return (positive, negative)
|
||||
|
||||
for control_net_tuple in cnet_stack:
|
||||
control_net, image, strength, start_percent, end_percent = control_net_tuple
|
||||
controlnet_conditioning = ControlNetApplyAdvanced().apply_controlnet(positive, negative, control_net, image,
|
||||
|
||||
Reference in New Issue
Block a user