Preview Text
See what a string actually contains before it hits your next node
- STRING
Sometimes you just need to look at a string. TextPreview does exactly that: wire any text output into it, and it displays the content directly on the node in the ComfyUI canvas - no console, no separate log window, just the value sitting right there in your graph.
What it's for
The obvious case is debugging: an LLM node generated a prompt, a trigger-word extractor pulled text off a LoRA, a caption model described an image - and you want to check what actually came out before it flows into a CLIPTextEncode or wherever it's headed next, without breaking your workflow to inspect it. It's the text equivalent of a Preview Image node, and just as unglamorous and just as useful for exactly that reason.
How it works
There's no processing here - it takes a string in, shows it, and passes it back out. The README credits the code as originally coming from ComfyUI-Custom-Scripts (pythongosssss's widely-used quality-of-life pack), added into this one for convenience so you don't need to install a whole separate pack just for this one node.
The inputs and outputs that matter
text(STRING, required) - whatever you want to look at.
Output is a STRING, and it's flagged as a list output - meaning if you feed it a batch of strings (say, captions generated across a batch of images) rather than a single value, it can display and pass through each one rather than only handling one string at a time. It's also marked as an output node, so it's valid to leave it as a dead end in your graph - you don't need to wire its output anywhere for it to do its job and show you the text.
How to install it
Via ComfyUI Manager: search "ComfyUI-utils-nodes," install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/zhangp365/ComfyUI-utils-nodes
Restart ComfyUI. This is about as light as a custom node gets - no models, no dependencies, nothing to configure. If you already have ComfyUI-Custom-Scripts installed and its own equivalent node, you don't strictly need this one too; it's here for people who want the one node without pulling in that pack's full set.
Common issues & troubleshooting
There's genuinely very little to go wrong here - it's a debug/display node with no logic of its own. The one thing worth knowing is that it's a terminal node by design (it's marked is_output_node), so don't be surprised that it works fine sitting at the end of a branch with nothing downstream of it; that's the intended use, not a sign something's missing from your graph.
If a very long string looks cramped or hard to read on the node face, that's a canvas-display limitation more than anything - zoom in, resize the node, or drag its corner to give it more room rather than assuming the node dropped part of your text.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |