From 10e6e218140893b501997340ac00cf3b17a497c6 Mon Sep 17 00:00:00 2001 From: huchenlei Date: Tue, 20 Aug 2024 16:36:45 -0400 Subject: [PATCH] Add experimental flag --- custom_nodes/example_node.py.example | 3 +++ server.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/custom_nodes/example_node.py.example b/custom_nodes/example_node.py.example index 000ccf943..29ab2aa72 100644 --- a/custom_nodes/example_node.py.example +++ b/custom_nodes/example_node.py.example @@ -26,6 +26,9 @@ class Example: DEPRECATED (`bool`): Indicates whether the node is deprecated. Deprecated nodes are hidden by default in the UI, but remain functional in existing workflows that use them. + EXPERIMENTAL (`bool`): + Indicates whether the node is experimental. Experimental nodes are marked as such in the UI and may be subject to + significant changes or removal in future versions. Use with caution in production workflows. execute(s) -> tuple || None: The entry point method. The name of this method must be the same as the value of property `FUNCTION`. For example, if `FUNCTION = "execute"` then this method's name must be `execute`, if `FUNCTION = "foo"` then it must be `foo`. diff --git a/server.py b/server.py index 0864d9dd8..23ebdb7ba 100644 --- a/server.py +++ b/server.py @@ -445,6 +445,8 @@ class PromptServer(): if getattr(obj_class, "DEPRECATED", False): info['deprecated'] = True + if getattr(obj_class, "EXPERIMENTAL", False): + info['experimental'] = True return info @routes.get("/object_info")