ComfyUI Node

multiTextConcat

Merge any number of prompt-node outputs into one clean string

By sp8999·Created 6 months ago·Updated 6 months ago· 8
multiTextConcat
    • text
    text_count1
    text_1
    text_2
    text_3
    text_4
    text_5
    text_6
    text_7
    text_8
    text_9
    text_10
    text_11
    text_12
    text_13
    text_14
    text_15
    text_16
    text_17
    text_18
    text_19
    text_20

    multiTextConcat is the sibling of multiText with the typing removed. Where multiText gives you up to 20 editable text boxes, this node gives you up to 20 connector-only inputs - every slot is forced to be a wire (forceInput in the schema), so you can't type into any of them. Its whole job is to gather text coming out of other nodes and merge it into a single string. If your prompt fragments live in other nodes, this is the one you want.

    When you'd use it

    Any time your text isn't sitting in a text box, it's coming from somewhere else: the output of a SelectTexts toggle node, a LoraTagsOnly trigger-word dump, a wildcard picker, an LLM prompt node, another combiner. ComfyUI doesn't have a built-in "concatenate N strings" node, so you end up chaining text nodes in series - which gets unreadable fast and is exactly the illegibility problem the plumbing layer is supposed to fight. This node collapses that chain into one place: wire everything in, get one string out.

    How it works

    The schema is the same shape as multiText - text_count (1–20, default 1) plus text_1 through text_20 - but with a critical difference: all the slots are marked forceInput, meaning the frontend renders them as input sockets, not text boxes. At runtime it collects every non-empty input in order and joins them with ", ", skipping empties so you don't build a string full of double commas. The text output is a single STRING ready to feed a CLIP Text Encode or a prompt assembler.

    The input that matters:

    • text_count - how many connector slots to show. Raise it to get more sockets.
    • text_1 … text_20 - all wire-only.
    • text - the output: everything, comma-joined, in input order.

    Order and gotchas

    • Order is input order, always. The join goes in order of the slot numbers. If two upstream branches both feed it, the sequence is fixed by which slot each one lands on - that's your only control, so wire deliberately. Word order binds meaning in prompts (the knowledge base hammers this for both CLIP and LLM encoders), so "background, subject" reads differently from "subject, background."
    • Every slot needs a wire. Because nothing is editable, an unwired slot just contributes nothing - which is convenient, since you can leave empty sockets in place and only plug in the ones you're using that run.
    • The first slot is also wire-only here. Unlike multiText, you can't type anything in, full stop. For a hybrid (some typed, some wired), you'd chain this after a typed box.

    Installation

    Same pack, same routine: ComfyUI Manager → search ComfyUI-Text-Utils-sp → Install → restart, or clone it manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/sp8999/ComfyUI-Text-Utils-sp.git
    

    Then find it in the text_utils_sp category. Zero dependencies, no models, no downloads - it's pure text plumbing. As with the rest of the pack it's tuned for the Nodes 2.0 frontend; on v1 the dynamic slots still work but can render at odd sizes.

    Categorytext_utils_sp

    Inputs (21)

    NameTypeDefaultDescription
    text_countINT11–20
    text_1STRING
    text_2optSTRING
    text_3optSTRING
    text_4optSTRING
    text_5optSTRING
    text_6optSTRING
    text_7optSTRING
    text_8optSTRING
    text_9optSTRING
    text_10optSTRING
    text_11optSTRING
    text_12optSTRING
    text_13optSTRING
    text_14optSTRING
    text_15optSTRING
    text_16optSTRING
    text_17optSTRING
    text_18optSTRING
    text_19optSTRING
    text_20optSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING