IF Display Text📟
The 'what did that node actually output?' checker — print any string to the console
- text
- text_list
- count
- selected
IF Display Text is the debugging pass-through of the IF_AI pack. Every LLM node in this pack outputs strings, and most of the time you can't see them - the value just flows silently into the next node. This little node grabs any string, prints it to the ComfyUI console (with the pack's telltale ================== banner), and shows it in the node UI. It's the "trust but verify" node: wire it after a prompt-maker or chat node, and you finally see what the model actually said before it hits your sampler.
It earns its keep in two situations. First, when a prompt-generation pipeline is producing garbage and you need to see the raw output instead of the downstream results. Second, when a prompt is a multi-line blob and you only want one line out of it - the select input cycles through lines, which is how you'd build a "pick one variation from a batch of text" workflow without extra nodes.
How it works
The mechanism is dead simple: take the text input, split it on newlines, drop empty lines, and count what's left. The selected output picks one line using select % count - modulo, so any index you throw at it wraps around safely instead of erroring. The full text still passes through the text output, the individual lines come out as text_list, and count tells you how many lines there were. Everything gets printed to the console so you can see it even if nothing's wired downstream.
The inputs that matter
text- the string to display and split. It's a forced input, so it has to come from another node.select- which line to surface inselected. Cycle through them by raising this value.
Outputs: text (pass-through of everything), text_list (one line per list slot), count (line count), selected (the single line you picked).
Installation
Pack standard:
cd ComfyUI/custom_nodes
git clone https://github.com/if-ai/ComfyUI-IF_AI_tools.git
pip install -r requirements.txt
Or "IF_AI_tools" via ComfyUI Manager and restart. No model files.
Gotchas
Not much to trip on, but one habit is worth building: this node is an output node, so the graph runs to it and it blocks nothing. Keep it dangling in a workflow to inspect strings - it's cheap and harmless. The only real annoyance is that the console banner is loud (the pack prints IF_AI_tool_output with heavy borders), which gets noisy in a busy session. Minor, and honestly kind of charming. The pack is archived, but a string viewer is about as rot-proof as nodes get.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| select | INT | 00–9223372036854776000 | Select which line to output (cycles through available lines) |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| text_list | STRING | — |
| count | INT | — |
| selected | STRING | — |