ComfyUI Node

Show Text

A PreviewAny that survives reloads

By r-vage·Created 10 months ago·Updated a day ago· 31
Show Text
  • source
  • text

ComfyUI's core PreviewAny node is great until it isn't: the value it shows you lives in a UI widget that evaporates when the workflow reloads, and inside subgraphs it gets flaky. Show Text is the Eclipse answer - same "accept any type, print it as a string" idea, but with two upgrades that matter if you live in ComfyUI all day: the displayed text is persisted back into the workflow metadata, and it behaves properly inside subgraphs.

The author says it plainly in the node description: "universal text preview - accepts any input type, converts it to a readable string, and displays it in a DOM widget. The text output persists in subgraphs. Inspired by ComfyUI core PreviewAny." That's the whole pitch, and the persistence bit is the real differentiator. ComfyUI stores the full workflow graph in the PNG metadata (that's why dragging an output image back rebuilds the whole graph), and Show Text leans on the same mechanism: it writes the rendered text back into the saved workflow, so reload the graph and the last value is still there to read.

How it works

The source input is wildcard-typed, so you can connect anything. Inside, it converts by type: strings stay strings, numbers and booleans become their text form, None becomes "None", and anything more complex - dicts, tuples, conditioning - gets JSON-serialized with indentation (falling back to str() if JSON can't represent it). Tensors are truncated via print options so you get shapes without a 4D dump. Then it finds its own node in the workflow metadata and writes the rendered value back into the widget value, which is what makes the text survive a reload. The output is a clean text STRING, so you can also wire it onward - say, into a save node that writes the value to disk.

One input, one output, no surprises:

  • source - any value you want to preview as text.
  • text (output) - the stringified version, usable downstream.

Where it fits

Show Any is the "print a debug line" node; Show Text is the one you reach for when the string itself is the artifact - a generated prompt, a filename, a path, a sampler value you want to eyeball or save. Because the output is a real STRING, it composes with everything: feed a prompt-builder's output into Show Text, then into a CLIP Text Encode, and you both see and use the same value.

Installing it

Ships in ComfyUI_Eclipse, zero extra dependencies:

git clone https://github.com/r-vage/ComfyUI_Eclipse custom_nodes/ComfyUI_Eclipse

Or ComfyUI Manager → search "ComfyUI_Eclipse" → install, restart.

Gotchas

The persistence trick needs the workflow metadata to be present - if you're driving ComfyUI purely as an API, the UI graph isn't serialized and the value won't come back on reload. Not a bug, just how the mechanism works. And one family note: if an old workflow references the pre-v4.0.0 RvTools-era node IDs, the pack's migration tool is your fix; new workflows are unaffected.

Category🌒 Eclipse/ Tools

Inputs (1)

NameTypeDefaultDescription
source*Any value to preview as text.

Outputs (1)

NameTypeDescription
textSTRING