From f41530ef2cc99485339a6e27035dee15583aeca4 Mon Sep 17 00:00:00 2001 From: Inoland Date: Sat, 28 Mar 2026 18:45:24 +0400 Subject: [PATCH] Update extra_nodes.py --- src/comfyui_ino_nodes/utils/extra_nodes.py | 43 ++++++++++------------ 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/src/comfyui_ino_nodes/utils/extra_nodes.py b/src/comfyui_ino_nodes/utils/extra_nodes.py index a84fd94..7ece4c2 100644 --- a/src/comfyui_ino_nodes/utils/extra_nodes.py +++ b/src/comfyui_ino_nodes/utils/extra_nodes.py @@ -54,34 +54,31 @@ class InoAnyEqual(io.ComfyNode): return io.NodeOutput(input == compare) -class InoDelayAsync: - """ - reverse boolean - """ +class InoDelayAsync(io.ComfyNode): + @classmethod + def define_schema(cls): + template = io.MatchType.Template("relay") + return io.Schema( + node_id="InoDelayAsync", + display_name="Ino Delay Async", + category="InoNodes", + inputs=[ + io.Boolean.Input("enabled", default=True, label_off="OFF", label_on="ON"), + io.MatchType.Input("relay", template=template), + io.Float.Input("delay", default=0.0, min=0.0, max=10000.0, step=0.1), + ], + outputs=[ + io.MatchType.Output(template=template, display_name="output"), + ], + ) @classmethod - def INPUT_TYPES(s): - return { - "required": { - "enabled": ("BOOLEAN", {"default": True, "label_off": "OFF", "label_on": "ON"}), - "relay": (any_type, {}), - "delay": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 10000.0, "step": 0.1,}), - } - } - - RETURN_TYPES = (any_type,) - RETURN_NAMES = ("output",) - - FUNCTION = "function" - - CATEGORY = "InoNodes" - - async def function(self, enabled, relay, delay): + async def execute(cls, enabled, relay, delay) -> io.NodeOutput: if not enabled: - return (relay,) + return io.NodeOutput(relay) await asyncio.sleep(delay) - return (relay,) + return io.NodeOutput(relay) class InoPrintLog: """