LZ Text Preview
Actually see the string your nodes are building
- text
ComfyUI is a node graph, not a spreadsheet - you don't get a live view of what each string node is holding. The moment your prompt is assembled from six concatenated parts, or randomized by a replace node, you're flying blind: you click run and hope the text that actually reached the encoder was the text you meant. LZ Text Preview is the cure. It's a pass-through node that takes a string in and shows the current value right on the node's body, read-only, updated after every run.
That last part is the entire point. Because the value is only refreshed after execution, the node shows you what actually got used - not what you hoped was in the box. If a wildcard picked something weird, or a concat produced double commas, you'll see it here before the image ever matters.
The mechanics
- Input:
text- any string, wired in (it'sforceInput). - Output:
text- the exact same string, passed through untouched.
It's marked as an output node, which is a useful side effect worth exploiting: output nodes always run, so placing LZTextPreview at the end of a string chain forces every node feeding it to execute. Add one at the end of your prompt-assembly pipeline and you get both a guaranteed run and a live readout of the final prompt. The JS that renders it adds a read-only widget to the node body after each execution; the string also flows out the output socket, so you can keep the chain going if you want.
When it's genuinely the right tool
The classic cases: you're using LZPromptReplace* and want to confirm which candidate got picked; you're building a filename from a sanitized prompt and want to see the result before it hits a save node; you're debugging a StringConcatNode and need to see whether the separator landed where you expected. It's also just a good habit in any workflow you're still iterating on - a preview node per important string costs nothing and saves a lot of second-guessing.
Its limits are the flip side of its simplicity: it shows strings, and strings only. It won't preview conditioning, and the value only updates after a run, so it's a post-execution inspector rather than a live editor. For a from-scratch text input there's nothing to inspect - you'd use this on built strings, not authored ones.
Installing it
Part of the ComfyUI-LZNodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/liz-ils/ComfyUI-LZNodes
Restart ComfyUI, or install via ComfyUI Manager by searching "ComfyUI-LZNodes". No extra dependencies, no model downloads.
If you find yourself dropping one of these on every text branch, you're doing it right - it's the cheapest debugging tool in the pack, and it does its one job without ceremony.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |