ComfyUI Node Runs on cloud

String Concatenate

Join two strings with a delimiter

By Derfuu·Created 3 years ago·Updated 2 years ago· 455
String Concatenate
    • TEXT
    Prepend
    Append
    Delimiter,

    Glues two pieces of text together, with an optional separator in between. You give it a front part, a back part, and a delimiter, and it hands back one combined string. The obvious use in image generation is building a prompt out of parts - a fixed style suffix bolted onto a variable subject, say - so you can vary one piece without retyping the whole thing.

    It's a "String Operations" node in Derfuu_ComfyUI_ModdedNodes, the utility pack that treats a workflow like a small program, strings included.

    How it works

    Three widgets, one output:

    • Prepend (STRING) - the text that goes first.
    • Append (STRING) - the text that goes second.
    • Delimiter (STRING, default ", ") - what gets inserted between them. The default comma-space is deliberately prompt-friendly, since that's how tags are separated. Set it to empty if you want them joined with no gap.
    • Output TEXT (STRING) - Prepend + Delimiter + Append.

    The real power comes from converting Prepend and Append to inputs and wiring text nodes into them. Feed a Text box into one and a dynamically produced string into the other, and you assemble a prompt on the fly.

    Where you'd use it

    Prompt assembly, mostly. A base quality/style string in one input, a per-run subject in the other, and you get a clean combined prompt into your CLIP Text Encode without duplicating the boilerplate. Chain several concatenate nodes and you can build a prompt from a handful of reusable fragments. It also pairs with Search In Text if you want to check the assembled string for a keyword afterward.

    Reality check: string plumbing like this is well-trodden ground - WAS Node Suite, rgthree, and others all offer concat/text nodes, and some are more flexible (more inputs, list joins). Derfuu's is a clean two-string version. Fine for simple joins; reach for a richer one if you're stitching many fragments.

    Common issues & troubleshooting

    Extra comma where I didn't want one. The default delimiter is ", ". Clear it to an empty string if you want the two parts flush against each other.

    Old prompt-building nodes went red after an update. Derfuu has a documented habit of deleting deprecated node classes on pack reorganizations instead of keeping them around - this pack has churned its string/text nodes before, and workflows that relied on the older ones broke. If a concat-style node disappeared, re-add the current String Concatenate and re-wire.

    ModuleNotFoundError: No module named 'custom_nodes.Derfuu_ComfyUI_ModdedNodes'. An old workflow referencing a module path that moved. Update the pack via Manager, reload, replace the stale node.

    Need a straight find-and-replace instead of a join. That's a different node - the pack has a Replace operation for swapping substrings.

    Install: ComfyUI Manager → search "Derfuu" → install → restart, or cd ComfyUI/custom_nodes && git clone https://github.com/Derfuu/Derfuu_ComfyUI_ModdedNodes then restart. No models, no heavy dependencies.

    CategoryDerfuu_Nodes/Functions/String Operations

    Inputs (3)

    NameTypeDefaultDescription
    PrependSTRING
    AppendSTRING
    DelimiterSTRING,

    Outputs (1)

    NameTypeDescription
    TEXTSTRING