Nodes/barakapa-nodes/Concatenate String (Custom)
ComfyUI Node

Concatenate String (Custom)

It just glues three strings together — and that's the point

By barakapa·Created about a year ago·Updated about a year ago· 0
Concatenate String (Custom)
    • output_str
    str_1
    str_2
    str_3

    The glue in your graph

    Take three text boxes, squash them together, hand the result out on one wire. That's this node, and the whole reason it exists is the plumbing problem every ComfyUI graph hits: you want one string that's built from parts. A prompt assembled from a base phrase plus a style tag plus a negative note. A filename made of a model name, a date, and a counter. A caption that's a label and a value stitched together.

    ComfyUI's node layer is full of these little value-and-glue nodes for exactly that reason - the graph gets unreadable when you retype the same string in five places, so you build it once and fan it out. This one is the simplest possible version of that idea: no separator logic, no templating, no type tricks. It just adds.

    How it works

    The mechanism is literally str_1 + str_2 + str_3. That's the entire function body in the source, so there's nothing hidden. Three strings in, one string out, no separator inserted between them. That last part trips people up: if you want "sunset, mountains" you type the comma and space yourself, into whichever box you want them in. There's no magic that puts a delimiter between your inputs.

    Inputs you'll actually touch:

    • str_1, str_2, str_3 - three plain text widgets, all defaulting to empty.

    Output:

    • output_str - a STRING, wire it into a CLIP Text Encode, a filename prefix, another ConcatenateString, whatever.

    Using it well

    Leave a slot empty and it contributes nothing, so you can build a "pick your poison" node where only the boxes you fill matter. Only three slots? Chain two of these - feed the first one's output into the second's str_1 and keep going.

    The one real trap: it takes strings and only strings. Drop a number or a seed into it and ComfyUI will refuse the connection. Convert first with the pack's brkp_ConvertToString - that node turns any value into text, then this one does the joining. That pair is the classic combo for building a filename from a seed integer and a date.

    Installing it

    This ships in the barakapa-nodes pack, so you install it once and get all six nodes. Easiest way: ComfyUI Manager → "Install Custom Nodes" → search barakapa → install → restart ComfyUI. Or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/barakapa/barakapa-nodes
    

    Then restart. No model downloads, no extra dependencies - the pack is pure Python stdlib sitting on top of what ComfyUI already ships.

    Should you bother?

    It's the most vanilla node in the pack, and that's fine. If you already have a concatenate node from another suite, this changes nothing for you. But if you're building filename or prompt-assembly graphs and want one boring, predictable string joiner that does exactly what it says on the tin, this is that. Don't overthink it - you'll use it more than you expect.

    Categorycustom

    Inputs (3)

    NameTypeDefaultDescription
    str_1STRING
    str_2STRING
    str_3STRING

    Outputs (1)

    NameTypeDescription
    output_strSTRING