Skip to content

Commit 15ec9ea

Browse files
authored
Add Output to V3 Combo type to match what is possible with V1 (#9813)
1 parent 33bd9ed commit 15ec9ea

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

comfy_api/latest/_io.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def as_dict(self):
331331
})
332332

333333
@comfytype(io_type="COMBO")
334-
class Combo(ComfyTypeI):
334+
class Combo(ComfyTypeIO):
335335
Type = str
336336
class Input(WidgetInput):
337337
"""Combo input (dropdown)."""
@@ -360,6 +360,14 @@ def as_dict(self):
360360
"remote": self.remote.as_dict() if self.remote else None,
361361
})
362362

363+
class Output(Output):
364+
def __init__(self, id: str=None, display_name: str=None, options: list[str]=None, tooltip: str=None, is_output_list=False):
365+
super().__init__(id, display_name, tooltip, is_output_list)
366+
self.options = options if options is not None else []
367+
368+
@property
369+
def io_type(self):
370+
return self.options
363371

364372
@comfytype(io_type="COMBO")
365373
class MultiCombo(ComfyTypeI):

0 commit comments

Comments
 (0)