Skip to content

Commit

Permalink
"auto" type is only relevant to the SetUnionControlNetType node.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jul 22, 2024
1 parent 4151fbf commit b2c995f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion comfy/cldm/control_types.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
UNION_CONTROLNET_TYPES = {
"auto": -1,
"openpose": 0,
"depth": 1,
"hed/pidi/scribble/ted": 2,
Expand Down
4 changes: 2 additions & 2 deletions comfy_extras/nodes_controlnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class SetUnionControlNetType:
@classmethod
def INPUT_TYPES(s):
return {"required": {"control_net": ("CONTROL_NET", ),
"type": (list(UNION_CONTROLNET_TYPES.keys()),)
"type": (["auto"] + list(UNION_CONTROLNET_TYPES.keys()),)
}}

CATEGORY = "conditioning/controlnet"
Expand All @@ -14,7 +14,7 @@ def INPUT_TYPES(s):

def set_controlnet_type(self, control_net, type):
control_net = control_net.copy()
type_number = UNION_CONTROLNET_TYPES[type]
type_number = UNION_CONTROLNET_TYPES.get(type, -1)
if type_number >= 0:
control_net.set_extra_arg("control_type", [type_number])
else:
Expand Down

0 comments on commit b2c995f

Please sign in to comment.