switch to boolean flag and use original node name for id

This commit is contained in:
bymyself 2025-04-15 18:05:21 -07:00 committed by Robin Huang
parent 06819aa865
commit 5327cc8bbb
2 changed files with 4 additions and 4 deletions

View File

@ -229,8 +229,8 @@ class ComfyNodeABC(ABC):
"""Flags a node as experimental, informing users that it may change or not work as expected.""" """Flags a node as experimental, informing users that it may change or not work as expected."""
DEPRECATED: bool DEPRECATED: bool
"""Flags a node as deprecated, indicating to users that they should find alternatives to this node.""" """Flags a node as deprecated, indicating to users that they should find alternatives to this node."""
COMFY_API_NODE_NAME: Optional[str] API_NODE: bool
"""If the node is an API node, this is the name used to identify it.""" """Flags a node as an API node."""
@classmethod @classmethod
@abstractmethod @abstractmethod

View File

@ -581,8 +581,8 @@ class PromptServer():
if getattr(obj_class, "EXPERIMENTAL", False): if getattr(obj_class, "EXPERIMENTAL", False):
info['experimental'] = True info['experimental'] = True
if hasattr(obj_class, 'COMFY_API_NODE_NAME'): if hasattr(obj_class, 'API_NODE'):
info['comfy_api_node_name'] = obj_class.COMFY_API_NODE_NAME info['api_node'] = obj_class.API_NODE
return info return info
@routes.get("/object_info") @routes.get("/object_info")