From a86fddcdd481cd615bbd89850294cb7ed43c0c56 Mon Sep 17 00:00:00 2001 From: "kosinkadink1@gmail.com" Date: Wed, 9 Jul 2025 00:26:15 -0500 Subject: [PATCH] Fixed MultiCombo, confirmed VALIDATE_INPUTS, IS_CHANGED works --- comfy_api/v3/io.py | 2 +- comfy_extras/nodes_v1_test.py | 3 ++- comfy_extras/nodes_v3_test.py | 8 ++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/comfy_api/v3/io.py b/comfy_api/v3/io.py index 78be29321..1e4c927ae 100644 --- a/comfy_api/v3/io.py +++ b/comfy_api/v3/io.py @@ -433,7 +433,7 @@ class MultiCombo(ComfyType): def as_dict_V1(self): to_return = super().as_dict_V1() | prune_dict({ - "multiselect": self.multiselect, + "multi_select": self.multiselect, "placeholder": self.placeholder, "chip": self.chip, }) diff --git a/comfy_extras/nodes_v1_test.py b/comfy_extras/nodes_v1_test.py index ea9884856..dca4e86ee 100644 --- a/comfy_extras/nodes_v1_test.py +++ b/comfy_extras/nodes_v1_test.py @@ -13,6 +13,7 @@ class TestNode(ComfyNodeABC): "min": 0, "max": 127, "default": 42, "tooltip": "My tooltip 😎", "display": "slider"}), "combo": (IO.COMBO, {"options": ["a", "b", "c"], "tooltip": "This is a combo input"}), + "combo2": (IO.COMBO, {"options": ["a", "b", "c"], "multi_select": True, "tooltip": "This is a combo input"}), }, "optional": { "xyz": ("XYZ",), @@ -29,7 +30,7 @@ class TestNode(ComfyNodeABC): CATEGORY = "v3 nodes" - def do_thing(self, image: torch.Tensor, some_int: int, combo: str, xyz=None, mask: torch.Tensor=None): + def do_thing(self, image: torch.Tensor, some_int: int, combo: str, combo2: list[str], xyz=None, mask: torch.Tensor=None): return (some_int, image) diff --git a/comfy_extras/nodes_v3_test.py b/comfy_extras/nodes_v3_test.py index ba7f88ee7..01fbfa2ba 100644 --- a/comfy_extras/nodes_v3_test.py +++ b/comfy_extras/nodes_v3_test.py @@ -72,6 +72,14 @@ class V3TestNode(io.ComfyNodeV3): is_output_node=True, ) + @classmethod + def VALIDATE_INPUTS(cls, image: io.Image.Type, some_int: int, combo: io.Combo.Type, combo2: io.MultiCombo.Type, xyz: XYZ.Type=None, mask: io.Mask.Type=None, **kwargs): + if some_int < 0: + raise Exception("some_int must be greater than 0") + if combo == "c": + raise Exception("combo must be a or b") + return True + @classmethod def execute(cls, image: io.Image.Type, some_int: int, combo: io.Combo.Type, combo2: io.MultiCombo.Type, xyz: XYZ.Type=None, mask: io.Mask.Type=None, **kwargs): zzz = cls.hidden.prompt