Simple String View
Two strings, one line in your terminal — the pack's debug printer
Some nodes are for making images. This one is for the far less glamorous job of figuring out what the hell a string input actually contains. StringViewer (display name "Simple String View") takes two strings, prints them to the ComfyUI terminal as [VIEW] <text1>,<text2>, and does nothing else. No outputs, no preview image, no widget. It's a print() with a label, wrapped in a node, and that is genuinely the whole spec.
You reach for it when you're debugging a batch workflow and you need eyes on the actual values flowing through: is the task_id really what you think it is, did the name selector return a filename or garbage, does that string node output have trailing whitespace breaking your path? In a GUI you'd normally use a text display node - but ComfyForEach leans toward headless, scripted runs on EC2, where there is no GUI and the terminal is the UI. That's the niche this fills: a terminal viewer for a terminal-run pipeline.
How it works
The source is transparent. It declares two required STRING inputs, text1 and text2, marks itself an output node, and its function prints [VIEW] text1,text2 to stdout (with a small error path that prints [ERROR] if something in the formatting throws, which realistically means one of the inputs isn't the string you think it is). It returns nothing. Because it's an output node, ComfyUI treats it as an endpoint - make sure it's reachable from the branch you actually want to inspect, or ComfyUI may complain the graph has nothing feeding it during execution.
Inputs
text1- STRING, required.text2- STRING, required.
Both are mandatory, which is slightly annoying when you only want to view one value - but it's also the answer to the obvious question "why two?" It's built for the pack's pattern of pairing things: the image name and its index, the task id and its status, two values you want to see side by side. If you've only got one string, feed the same value to both or just use any other text viewer.
Install
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/pupba/Comfy_ForEach
cd Comfy_ForEach
pip install -r requirements.txt
Or ComfyUI Manager → ComfyForEach. Restart. Dependencies are pillow, boto3, opencv-python-headless, numpy, torch - nothing this node itself uses beyond Python's print.
Where people get burned
- You can't see it in the browser. There's no on-canvas preview; the output is only in the terminal that's running the ComfyUI server. If you launched ComfyUI as a Windows double-click with the console hidden, "nothing happens" is exactly what you'll observe.
- "Missing" node behavior when it's not reached. As an output node, an unconnected
StringViewercan cause "no path to output" style warnings on some workflows. Only include it where you're actively debugging, then delete it. - It prints, it doesn't return. Wire the strings into it and the values are gone from the graph - this is a sink, not a pass-through. If you need to both see and continue using a string, use a text display node instead.
That's it. It's a two-string debug printer, and it knows its job. If you run ComfyUI headless, you'll be glad it exists when a workflow silently misbehaves; if you live in the GUI, you'll find better tools and never miss it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text1 | STRING | — | |
| text2 | STRING | — |
Outputs (0)
No outputs