Nodes/JPS Custom Nodes for ComfyUI/Text Concatenate (JPS)
ComfyUI Node

Text Concatenate (JPS)

Glue up to five strings together with a chosen delimiter

By JPS-GER·Created 3 years ago·Updated 2 years ago· 100
Text Concatenate (JPS)
    • text
    delimiter
    text1
    text2
    text3
    text4
    text5

    Prompts in a real ComfyUI graph rarely come from one place. You've got a base description, maybe a style-node output, maybe a LoRA's trigger words, maybe a date-stamped filename tag - all separate strings that need to end up joined into one before they hit a text encoder or a filename widget. This node is the join step: feed it up to five strings, tell it how to space them, get one string back.

    The optional inputs text1 through text5 each take a STRING, and you don't need to fill all five - leave whichever slots you're not using empty. The single required input, delimiter, picks how the pieces get stitched together: none (jammed together with nothing between them), space, or comma. The output, text, is the concatenated result.

    That's the whole node, and the simplicity is deliberate - this isn't a template engine or a find-and-replace tool, it's a join function. The value is in not needing a Python-style string-formatting node (or worse, manually re-typing a combined prompt every time one piece changes) just to stick a few strings together in order.

    Where it fits. Two common patterns: building a prompt out of separate reusable pieces (a base scene description plus a style snippet plus trigger words, so each can be edited or swapped independently without touching the others), and building a filename or metadata string (combining a static prefix with Get Date Time String (JPS)'s output, for example, so every save gets a fresh unique name without you touching the SaveImage node's widget by hand). Anywhere you'd otherwise be hardcoding a combined string that really wants to stay three separately-editable pieces, this is the node that recombines them.

    Installing it. Through ComfyUI Manager (search "JPS Custom Nodes for ComfyUI"), or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/JPS-GER/ComfyUI_JPS-Nodes.git
    

    Restart ComfyUI and find it under JPS Nodes/Text. If you're reinstalling over an older copy of the pack, delete that first - the author explicitly warns two overlapping installs collide on class names. No models, no dependencies; it's string concatenation.

    Troubleshooting. The thing that trips people up most: the delimiter applies uniformly between every connected piece - you can't set a different delimiter between text1-and-text2 versus text2-and-text3. If you need mixed spacing (a comma here, nothing there), you'll need to bake that punctuation into one of the individual text strings yourself rather than relying on this node to vary it. Also worth knowing: leaving a slot disconnected is fine and it's simply skipped, but an empty string connected to a slot (versus nothing connected at all) can still insert an extra delimiter next to nothing, leaving a stray comma or double space in your output - if your combined string looks like it has an odd gap, check whether one of the text inputs is wired to something producing an empty string rather than genuinely disconnected.

    CategoryJPS Nodes/Text

    Inputs (6)

    NameTypeDefaultDescription
    delimiterCOMBO3 options: none, space, comma
    text1optSTRING
    text2optSTRING
    text3optSTRING
    text4optSTRING
    text5optSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING