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