Nodes/ComfyUI_AceNodes/πŸ… Text Concatenate
ComfyUI Node

πŸ… Text Concatenate

Join two text strings in the graph β€” the node nobody remembers to build

By hay86Β·Created 2 years agoΒ·Updated about a year agoΒ· 96
πŸ… Text Concatenate
    • STRING
    β—„text1β€”β–Ί
    β—„text2β€”β–Ί
    β—„separator, β–Ί

    Core ComfyUI has an embarrassingly obvious gap: you cannot just add two text strings together. You can add numbers, you can merge lists, but plain string concatenation requires either the built-in Text Concatenate that shipped in newer core versions, or a utility pack like this one. This node is that exact job - text1 + text2 with a separator of your choice, one STRING out. That's the entire spec, and it's exactly why it's useful.

    It's part of πŸ… Ace Nodes (hay86/ComfyUI_AceNodes), a one-author grab-bag of small utilities. No community footprint to speak of - but you don't need a community to vouch for "a" + ", " + "b".

    What it does

    Three inputs, one output:

    • text1 / text2 - multiline text fields, both marked forceInput so you can wire them from other nodes (a prompt loader, a STRING widget, another text node).
    • separator - what goes between them. Default is , (comma-space), which is the right default for prompt-style concatenation like style1, style2. Change it to a newline, a space, or nothing at all.

    Output: STRING. No list handling, no whitespace trimming, no tricks - if you feed in a and b with separator , you get exactly a, b.

    Why you'll reach for it

    Prompt assembly. The classic workflow: a base prompt, a subject, and a style, each held in its own text node so you can swap them independently - then this node stitches them into one string for the CLIP text encoder. It's also the fix when you get a "string" value from somewhere and need to append a dynamic suffix or prefix, since ComfyUI's widget-to-widget text flow is more awkward than it should be.

    One honest note: if you're on a recent ComfyUI core build, there's a native Text Concatenate node that does the same thing, and CombinePrompts style nodes in packs like ComfyUI-Custom-Scripts also cover this. This node exists because it was written before those got comfortable - it's still perfectly fine, just not unique. Where it is genuinely handy is as a primitive to build on: wire the output into this pack's ACE_TextInputSwitch4Way or a preview node and you have a tiny template system.

    Installing

    ComfyUI Manager β†’ search ComfyUI_AceNodes, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/hay86/ComfyUI_AceNodes
    

    Then restart. The only wrinkle: Manager installs the pack's full requirements.txt - rembg, transformers, insightface, soundfile, openai, boto3, oss2 and friends - even though a string joiner needs none of them. If you're on Windows and insightface fails to build during install, that's a pack-wide dependency issue, not a problem with this node; the text nodes themselves will work fine once the pack imports.

    That's the whole review. There is no hidden depth here, and there shouldn't be - concatenation is a solved problem, and this is a clean, dependency-light (in usage, not in install) implementation of it.

    CategoryAce Nodes

    Inputs (3)

    NameTypeDefaultDescription
    text1STRINGβ€”
    text2STRINGβ€”
    separatorSTRING, β€”

    Outputs (1)

    NameTypeDescription
    STRINGSTRINGβ€”