add: name

This commit is contained in:
karrix 2024-10-23 19:07:42 +08:00
parent 67d27bd4aa
commit 02f499a4dc

View File

@ -16,6 +16,7 @@ class ComfyDeployStdOutputAny:
def INPUT_TYPES(cls): # pylint: disable = invalid-name, missing-function-docstring
return {
"required": {
"name": ("STRING", {"default": "ComfyUI"}),
"source": (any, {}), # Use "*" to accept any input type
},
}
@ -25,7 +26,7 @@ class ComfyDeployStdOutputAny:
FUNCTION = "run"
OUTPUT_NODE = True
def run(self, source=None):
def run(self, name, source=None):
value = "None"
if source is not None:
try:
@ -36,7 +37,7 @@ class ComfyDeployStdOutputAny:
except Exception:
value = "source exists, but could not be serialized."
return {"ui": {"text": (value,)}}
return {"ui": {name: (value,)}}
NODE_CLASS_MAPPINGS = {"ComfyDeployStdOutputAny": ComfyDeployStdOutputAny}