mirror of
https://github.com/jags111/efficiency-nodes-comfyui.git
synced 2026-03-21 21:22:13 -03:00
feat: make cnet_stack optional
This commit is contained in:
@@ -358,8 +358,8 @@ class TSC_Apply_ControlNet_Stack:
|
|||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(cls):
|
def INPUT_TYPES(cls):
|
||||||
return {"required": {"positive": ("CONDITIONING",),
|
return {"required": {"positive": ("CONDITIONING",),
|
||||||
"negative": ("CONDITIONING",),
|
"negative": ("CONDITIONING",)},
|
||||||
"cnet_stack": ("CONTROL_NET_STACK",)},
|
"optional": {"cnet_stack": ("CONTROL_NET_STACK",)}
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURN_TYPES = ("CONDITIONING","CONDITIONING",)
|
RETURN_TYPES = ("CONDITIONING","CONDITIONING",)
|
||||||
@@ -367,7 +367,10 @@ class TSC_Apply_ControlNet_Stack:
|
|||||||
FUNCTION = "apply_cnet_stack"
|
FUNCTION = "apply_cnet_stack"
|
||||||
CATEGORY = "Efficiency Nodes/Stackers"
|
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:
|
for control_net_tuple in cnet_stack:
|
||||||
control_net, image, strength, start_percent, end_percent = control_net_tuple
|
control_net, image, strength, start_percent, end_percent = control_net_tuple
|
||||||
controlnet_conditioning = ControlNetApplyAdvanced().apply_controlnet(positive, negative,
|
controlnet_conditioning = ControlNetApplyAdvanced().apply_controlnet(positive, negative,
|
||||||
|
|||||||
Reference in New Issue
Block a user