Download custom_nodes/ComfyUI-Custom-Scripts/py/show_text.py from StupidGame/MyComfySetUp: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/StupidGame/MyComfySetUp/resolve/main/custom_nodes/ComfyUI-Custom-Scripts/py/show_text.py
- Command line
-
hf download hf://StupidGame/MyComfySetUp/custom_nodes/ComfyUI-Custom-Scripts/py/show_text.py
-
curl -L -o show_text.py https://huggingface.co/StupidGame/MyComfySetUp/resolve/main/custom_nodes/ComfyUI-Custom-Scripts/py/show_text.py
1.02 kB
| class ShowText: | |
| def INPUT_TYPES(s): | |
| return { | |
| "required": { | |
| "text": ("STRING", {"forceInput": True}), | |
| }, | |
| "hidden": { | |
| "unique_id": "UNIQUE_ID", | |
| "extra_pnginfo": "EXTRA_PNGINFO", | |
| }, | |
| } | |
| INPUT_IS_LIST = True | |
| RETURN_TYPES = ("STRING",) | |
| FUNCTION = "notify" | |
| OUTPUT_NODE = True | |
| OUTPUT_IS_LIST = (True,) | |
| CATEGORY = "utils" | |
| def notify(self, text, unique_id = None, extra_pnginfo=None): | |
| if unique_id and extra_pnginfo and "workflow" in extra_pnginfo[0]: | |
| workflow = extra_pnginfo[0]["workflow"] | |
| node = next((x for x in workflow["nodes"] if str(x["id"]) == unique_id[0]), None) | |
| if node: | |
| node["widgets_values"] = [text] | |
| return {"ui": {"text": text}, "result": (text,)} | |
| NODE_CLASS_MAPPINGS = { | |
| "ShowText|pysssss": ShowText, | |
| } | |
| NODE_DISPLAY_NAME_MAPPINGS = { | |
| "ShowText|pysssss": "Show Text 🐍", | |
| } | |