Attempting to simplify node list definition in a python file via NODES_LIST

This commit is contained in:
kosinkadink1@gmail.com
2025-05-31 15:24:37 -07:00
parent 8b331c5ca2
commit de86d8e32b
3 changed files with 22 additions and 10 deletions

View File

@@ -46,15 +46,15 @@ class V3TestNode(ComfyNodeV3):
NODES: list[ComfyNodeV3] = [
NODES_LIST: list[ComfyNodeV3] = [
V3TestNode,
]
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
for node in NODES:
schema = node.GET_SCHEMA()
NODE_CLASS_MAPPINGS[schema.node_id] = node
if schema.display_name:
NODE_DISPLAY_NAME_MAPPINGS[schema.node_id] = schema.display_name
# NODE_CLASS_MAPPINGS = {}
# NODE_DISPLAY_NAME_MAPPINGS = {}
# for node in NODES_LIST:
# schema = node.GET_SCHEMA()
# NODE_CLASS_MAPPINGS[schema.node_id] = node
# if schema.display_name:
# NODE_DISPLAY_NAME_MAPPINGS[schema.node_id] = schema.display_name