Nodes/ComfyUI-SimpleChat/Text List (Batch)
ComfyUI Node

Text List (Batch)

Turn a pasted list of artists into a batch ComfyUI can sweep

By Moeblack·Created 9 months ago·Updated 7 months ago· 8
Text List (Batch)
    • item
    text
    split_modelines

    Batch testing in ComfyUI runs on list ports. A node marked with OUTPUT_IS_LIST tells the engine "I'm many values, fan the graph out for each of me" - and that's exactly what you want when you've got ten artists to try and no interest in wiring up ten copies of a sampler. Text List (Batch) is the thing that turns one pasted blob of text into that list. Paste ten artist tags, get a ten-item STRING list, and ComfyUI runs your pipeline once per item.

    The one decision: split_mode

    Everything reduces to how the text gets split:

    • lines - one item per line. The default, and the one you'll use 90% of the time.
    • comma - split on commas, with newlines treated as commas too. For when someone hands you a CSV-style list.
    • lines_or_comma - if there's any newline, split by lines; otherwise split by comma. The "I don't know what I'm getting" option.

    Lines starting with # or // are skipped as comments, and blank lines vanish. So you can annotate a list - # fast variants above euler_a - and the comments never reach the sampler.

    Where it fits

    It's the batch front-end for the SimpleChat family. Wire the list into any STRING input - SimpleChatText.prompt will run once per item - or drive an XY-style variation by feeding a Text List into a Mustache render and letting {{var}} swap per batch. Combined with SimpleChatMustacheVar, one text list can vary a single slot across a whole grid while the rest of the prompt stays fixed.

    Installing it

    Same pack, same one-liner:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Moeblack/ComfyUI-SimpleChat
    

    Restart, or use Manager and search "ComfyUI-SimpleChat". Dep is just aiohttp.

    Gotchas

    The output is a list, so be careful what you attach it to - a node that doesn't expand lists will treat the whole list as one value or error. And note the split is naive: items get stripped and blank lines dropped, but there's no deduplication and no unquoting, so "@a, @b" in comma mode becomes two items (both trimmed) while a stray trailing comma yields an empty item that vanishes. Keep your source lists clean and they'll split clean. If your text is a single value you don't want batched, use Text Input instead - same pack, no list behavior.

    CategorySimpleChat/Utils

    Inputs (2)

    NameTypeDefaultDescription
    textSTRING
    split_modeCOMBOlines3 options: lines, comma, lines_or_comma

    Outputs (1)

    NameTypeDescription
    itemSTRING