Nodes/Elegant Nodes/Elegant Any to String Multi Preview
ComfyUI Node

Elegant Any to String Multi Preview

Give your numbers somewhere to go

By wipeer·Created 22 days ago·Updated 13 days ago· 2
Elegant Any to String Multi Preview
  • sources
  • string
  • value
◄delimiter\n►
◄wrap_textfalse►
◄modeconcat►
◄index1►
◄out_of_rangeerror►
◄use_prefixfalse►
◄prefix►
◄use_suffixfalse►
◄suffix►

Somewhere in your fifth hour of debugging a workflow you'll want to look at four numbers at once - the seed that ran, the width, the steps, the CFG - without adding four preview nodes that each grab a chunk of your screen. That's this node. Wire the values in, read them in one box, keep going.

What it is and where it fits

Elegant Any to String Multi Preview takes several values of any type, converts each to text, joins them with a delimiter you choose, and both shows the result and outputs it as a string. It's the multi-input twin of the pack's single-value preview, and it comes from Elegant Nodes by wipeer - a small utility pack whose whole angle is that its nodes keep working from the subgraph node rather than only from inside the collapsed subgraph. That matters here more than it sounds: with this node tucked inside a subgraph, the joined text shows up on the subgraph node after each run, so you don't have to open anything to see it. The last text is saved with the workflow too, so it's there the moment you load the file.

In the plumbing taxonomy this is a debug/inspection node: it renders values as text rather than moving them. The pack is genuinely obscure - there's essentially no community coverage of it - so expect to be figuring it out from the node itself, which is fine, because there isn't much to it.

How it works

The conversion is deliberately unglamorous. Text stays as text. Numbers and booleans become their value. Lists and dictionaries become indented JSON. Anything else - latents, tensors, model objects - gets printed, with the tensor printer temporarily set to show only the first and last six items per dimension, so a big shape gives you a readable summary instead of a wall of numbers. That's tuned for the case you'll actually hit: "is this latent the shape I think it is?"

Then the pieces are joined with delimiter, and the joined string is what the node shows and outputs. There's no Markdown interpretation here - no bold, no headings, no lists getting re-rendered - which is the difference between this and ComfyUI's own Preview as Text lineage. Plain text, selectable and copyable.

Inputs and outputs

sources is the auto-growing input. Connect something to source_1, a new socket appears, up to 20 of them; disconnect one in the middle and the gap closes rather than leaving a hole you have to work around. The script lists them in order, so the output is in the order you connected them.

delimiter is what goes between the values, and it defaults to a literal \n - meaning the two characters, not a newline you've already typed. The node interprets \n, \t, \r, and \\ as their real characters, and takes anything else exactly as written. So , for a comma-separated line, | for a pipe, \t for a tab you can paste into a spreadsheet.

The single output is string, and it's more useful than "just a preview" suggests. Send it to a Note if you only want to read it. Send it to Save Image's filename_prefix and your files get named with the actual parameters that produced them. Or - the trick that makes this worth keeping around - join prompt fragments with , or \n and feed the output into a CLIP text encoder, so a reusable style string and a per-image subject string combine in one place instead of being retyped into three boxes.

Installing it

Manager first: search Elegant Nodes, install, done. Otherwise:

cd ComfyUI/custom_nodes
git clone https://github.com/wipeer/comfyui-elegant-nodes.git
pip install -r comfyui-elegant-nodes/requirements.txt

Restart ComfyUI and refresh the browser afterwards. The only Python dependency is simpleeval, already present in ComfyUI, so there's nothing large to fetch and no model files. Find it under utilities → elegant.

Rough edges worth knowing

The pack needs ComfyUI 0.4.0 or newer for V3 auto-growing inputs; on older builds it won't load at all. If a workflow from before version 1.0.0 shows a missing node, that's the id rename - the multi preview used to be called "Elegant Any to String (Advanced)" - and you'll need to drop the new node in and rewire it.

The one real gotcha is the node being classified as an output node, which is exactly why the text refreshes every queue. If you were hoping this thing would stay dormant on an expensive branch, it won't: it runs each time. Cheap as it is, that's the behavior - and it's what makes the subgraph preview trustworthy.

And the delimiter really is literal-minded. Typing \n gets you a newline; typing n gets you the letter n. If the preview looks like one long run-on line, that's usually it.

Categoryutilities/elegant

Inputs (10)

NameTypeDefaultDescription
sourcesCOMFY_AUTOGROW_V3Connect values here; a new input appears each time you connect the last one.
delimiterSTRING\nconcat: put between the values. Type \n for a new line and \t for a tab.
wrap_textBOOLEANfalseWrap long lines to the width of the preview box instead of scrolling sideways.
modeCOMBOconcatconcat: join all sources. switch: use only the source chosen by index.
indexINT1-2147483648–2147483647switch: which source to use, counting from 1 (source_1). Can be connected.
out_of_rangeCOMBOerrorswitch: what an index outside the sources does. error: stop with a message. clamp: below 1 uses the first source, above the last uses the last. wrap: count around (one past the last is the first again).
use_prefixoptBOOLEANfalseconcat: add the prefix text before the joined text.
prefixoptSTRINGconcat, when use_prefix is on: text added before the joined text. Type \n for a new line and \t for a tab.
use_suffixoptBOOLEANfalseconcat: add the suffix text after the joined text.
suffixoptSTRINGconcat, when use_suffix is on: text added after the joined text. Type \n for a new line and \t for a tab.

Outputs (2)

NameTypeDescription
stringSTRING—
value*switch: the chosen source unchanged (image, model, anything). concat: the joined text.