Show String
Read a string value back out of a ComfyUI run
- STRING
ShowString takes a STRING, shows it on the node, and - because it's flagged as an output node - pushes it into the run's returned message data too, so an API caller reading the result actually gets the string, not just a list of saved files. It's the string member of a small family in comfyui-easyapi-nodes: ShowInt, ShowNumber, ShowFloat and ShowBoolean all do the identical thing for their own types.
The reason it needs to be its own node comes down to how ComfyUI treats "output" by default: SaveImage and PreviewImage are the built-in output nodes, and they only know how to report pictures. A string computed mid-graph - a generated caption, a resolved file path, a status message built out of a few concatenated pieces - has nowhere to go on its own. lldacing built this pack for people calling ComfyUI as an API backend (the same way a serverless host executes your workflow), and getting non-image values to actually surface in the response is a big part of what it's for.
How it works
Pass-through with a reporting side effect, same as its siblings - the string you feed in comes back out unchanged, so ShowString never has to sit at the end of a chain; drop it in the middle of a graph purely to make a value visible.
The inputs and outputs that matter
str(STRING, required) - the string to display and report.key(STRING, default"text") - the label this value is filed under in the run's returned message. Matters once you have more than one Show* node in the same graph; give each a distinct key so an API client can pick the right one out of the response instead of getting them jumbled or overwritten.- Output:
STRING- the same value, unchanged.
How to install it
Via ComfyUI Manager, searching comfyui-easyapi-nodes. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/lldacing/comfyui-easyapi-nodes.git
cd comfyui-easyapi-nodes
pip install -r requirements.txt
Restart ComfyUI. No models or heavy dependencies for this node.
Common issues & troubleshooting
The string isn't in my API response. It's not in the standard files/outputs section - it's part of the run's history/websocket message data, filed under whatever key you set. If you're new to consuming ComfyUI's API directly, that message channel is the piece to go read up on; it's separate from the output-file list most quick-start examples cover.
Two ShowString nodes overwrite each other. Give each a unique key. Leaving multiple Show* nodes on the default "text" key is the most common way to lose track of which value is which once a graph grows past one probe.
Using it purely for on-canvas debugging. Perfectly fine, and arguably its simplest use - no API call required. Drop it after a text-processing node, run the workflow, and read the value right off the node in the UI.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| str | STRING | — | |
| key | STRING | text | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |