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

Commit

Permalink
Merge pull request #189 from philhk/optional-cnet_stack
Browse files Browse the repository at this point in the history
Optional ControlNet Stack
  • Loading branch information
LucianoCirino authored Oct 21, 2023
2 parents 333f984 + 7eef738 commit eae090a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions efficiency_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,16 +369,19 @@ 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",)
RETURN_NAMES = ("CONDITIONING+","CONDITIONING-",)
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,
Expand Down

0 comments on commit eae090a

Please sign in to comment.