Nodes/ComfyUI_zfkun/Preview Text List ๐Ÿ•๐Ÿ…ฉ๐Ÿ…•
ComfyUI Node

Preview Text List ๐Ÿ•๐Ÿ…ฉ๐Ÿ…•

Previewing a list of strings without ComfyUI choking on it

By zfkunยทCreated 3 years agoยทUpdated 7 months agoยท 23
Preview Text List ๐Ÿ•๐Ÿ…ฉ๐Ÿ…•
    • texts
    โ—„textsโ€”โ–บ

    ComfyUI has two different ways a connection can carry text: a single string, or a list of strings that ComfyUI runs through in list-mode. The regular Preview Text node is built for the first case, and if you point it at a list connection instead, it either errors or shows you a single item and nothing else - not what you want when you're debugging a batch of prompt variations or the output of a text-splitting node. Preview Text (List) is the version built for that case: it's list-aware on both sides, in and out.

    How it works

    Same idea as its non-list sibling - it's a passthrough tap, not a transform - but it's written to accept a list of strings, display all of them, and re-emit the list so you can keep chaining list-mode nodes afterward instead of collapsing back to a single value.

    The inputs and outputs that matter

    • texts (required, multiline STRING) - the README describes this as accepting "text listใ€primitive list (clip text) for input," meaning it's meant to sit on a list-mode connection - for example, right after Split Text in this same pack, or after any node that produces a batch of prompt strings.
    • Output: texts, explicitly a list output (is_list: true) - it passes the full list through rather than flattening it, so downstream list-mode nodes keep working normally.

    How to install it

    Via ComfyUI Manager: search "ComfyUI_zfkun", install, restart. Manually:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/zfkun/ComfyUI_zfkun
    pip install -r requirements.txt
    

    then restart. No models or heavy dependencies for this node.

    Common issues & troubleshooting

    You wired in a single string and it looks fine but feels overkill. It'll work - a list of one is still a list - but if you know you're only ever dealing with one string, plain Preview Text is the simpler tool and one less node to reason about.

    You wired in a list and only see one entry, or it errors. That's the symptom of using the wrong node - if you're on the non-list Preview Text by mistake, swap to this one. List-mode connections in ComfyUI need a node on the other end that actually declares list handling; a node that doesn't will either flatten or choke depending on the exact connection.

    Pairing it with Split Text. The most natural upstream partner in this pack is Split Text - split one blob of pasted text into a list by delimiter, then run it straight into this node to sanity-check the split actually landed on the boundaries you expected before you send that list further down the graph (into a batch of CLIP Text Encodes, for instance).

    It's a debug tool, not a UI element. Like the rest of the Preview Text family, this isn't meant to be a permanent fixture in a finished workflow - it's there so you can see what a list actually contains while you're building or troubleshooting, then it stays or goes depending on whether you still want the visibility.

    Categoryzfkun ๐Ÿ•๐Ÿ…ฉ๐Ÿ…•

    Inputs (1)

    NameTypeDefaultDescription
    textsSTRINGOriginal texts content to be previewed

    Outputs (1)

    NameTypeDescription
    textsSTRINGโ€”