Nodes/ComfyUI_BadgerTools/TextListToString-badger
ComfyUI Node

TextListToString-badger

Collapse a list of strings into one multiline string

By AbyssBadger0·Created 3 years ago·Updated 2 years ago· 8
TextListToString-badger
    • STRING
    texts

    ComfyUI is full of nodes that emit lists of things - batch text generators, iteration nodes, loop outputs - and just as full of nodes that insist on a single string. TextListToString-badger is the bridge: it takes a list of strings and joins them into one multiline string, newline-separated.

    The mechanism is in the node's type declaration: it's marked INPUT_IS_LIST = True, which tells ComfyUI the node accepts a list arriving on its input rather than a single value. If more than one item shows up, it concatenates them all with a newline between each and returns the result. If only one item arrives, it just passes it straight through - no join needed. That pass-through behavior is actually the nice part: the node is safe to drop into a workflow whether or not a list actually shows up, which makes it good defensive plumbing.

    The schema is as bare as it gets:

    • texts - a STRING input in list mode (that's the INPUT_IS_LIST flag in action).
    • Output: STRING - the joined, newline-separated text.

    Where does this actually earn its keep? After a node that generates a batch of prompt variations, when the next step only wants one text value. When you're assembling captions or labels from several sources into a single block for a display node or a text file writer. And inside this pack specifically, it slots nicely in front of StringToFizz-badger: batch text → join → indexed Fizz format, no manual assembly.

    One honest caveat: because the input is a string field that operates in list mode, it behaves a little differently from how it looks on the canvas. If you type multiple lines directly into the widget, it's a single string, not a list - the join path only triggers when a real list is fed in from upstream. And there's no separator option; it's always a newline. If you need a comma or a custom delimiter, you're in Format String territory instead.

    It's about as thin as a utility node gets, so it's not a reason to install the pack on its own - WAS Node Suite and friends have equivalents. But it's a perfectly solid one, no dependencies, no model downloads. Grab the pack via ComfyUI Manager (search ComfyUI_BadgerTools) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AbyssYuan0/ComfyUI_BadgerTools
    

    Restart, and it lives under the badger category. Small node, small job, does it without drama.

    Categorybadger

    Inputs (1)

    NameTypeDefaultDescription
    textsSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING