From 5327cc8bbb3ba2bc03a1b3bc60f16c7dd044ec9b Mon Sep 17 00:00:00 2001 From: bymyself Date: Tue, 15 Apr 2025 18:05:21 -0700 Subject: [PATCH] switch to boolean flag and use original node name for id --- comfy/comfy_types/node_typing.py | 4 ++-- server.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/comfy/comfy_types/node_typing.py b/comfy/comfy_types/node_typing.py index 621721213..dbb757c91 100644 --- a/comfy/comfy_types/node_typing.py +++ b/comfy/comfy_types/node_typing.py @@ -229,8 +229,8 @@ class ComfyNodeABC(ABC): """Flags a node as experimental, informing users that it may change or not work as expected.""" DEPRECATED: bool """Flags a node as deprecated, indicating to users that they should find alternatives to this node.""" - COMFY_API_NODE_NAME: Optional[str] - """If the node is an API node, this is the name used to identify it.""" + API_NODE: bool + """Flags a node as an API node.""" @classmethod @abstractmethod diff --git a/server.py b/server.py index f7ba25e61..f64ec27d4 100644 --- a/server.py +++ b/server.py @@ -581,8 +581,8 @@ class PromptServer(): if getattr(obj_class, "EXPERIMENTAL", False): info['experimental'] = True - if hasattr(obj_class, 'COMFY_API_NODE_NAME'): - info['comfy_api_node_name'] = obj_class.COMFY_API_NODE_NAME + if hasattr(obj_class, 'API_NODE'): + info['api_node'] = obj_class.API_NODE return info @routes.get("/object_info")