ComfyUI Node Runs on cloud

String Concatenate

DF_String_Concatenate – ComfyUI Node from Derfuu_ComfyUI_ModdedNodes

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

    DF_String_Concatenate glues two pieces of text together with a separator in between - not "combine any two strings," specifically Prepend + Delimiter + Append, in that fixed order. That's a subtle but important detail: this isn't a generic two-input joiner, the inputs are literally named for their position, so whatever you wire into Prepend always comes first and whatever you wire into Append always comes last, regardless of the order you connected them in.

    It's one of the string-handling nodes in Derfuu_ComfyUI_ModdedNodes, a math-and-utility pack that's been part of ComfyUI since 2023. The obvious use is prompt building: stitching a fixed base prompt together with a dynamically generated tag, a wildcard result, or output from another text node - without editing the base prompt by hand every time the dynamic part changes.

    Inputs and output

    Three required inputs, all STRING:

    • Prepend - the text that goes first
    • Append - the text that goes last
    • Delimiter - what sits between them (defaults to ", " - a comma and a space, matching typical tag-style prompt syntax)

    One output: TEXT (a STRING), equal to Prepend + Delimiter + Append.

    The default delimiter is worth noticing: ", " is exactly the separator most CLIP-style prompts use between comma-separated tags, so leaving it at default and wiring a base prompt into Prepend with a dynamically generated tag into Append gives you a properly formatted combined prompt with no extra cleanup. If you're joining something that isn't tag-style text - a sentence, a filename - you'll usually want to clear Delimiter or set it to a space instead.

    Where it fits

    The common pattern is a fixed prompt fragment on one side and something computed or randomized on the other - a LoRA trigger word coming from another node, a randomly selected style tag, a value generated earlier in the graph that's been converted to text. It's a small, single-purpose node, so it usually shows up alongside DF_String_Replace when a workflow needs to build up a final prompt string from several pieces rather than typing the whole thing into one text box.

    Installing

    The whole pack installs together - no single-node install. Through ComfyUI Manager: search Derfuu_ComfyUI_ModdedNodes, install, restart ComfyUI. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Derfuu/Derfuu_ComfyUI_ModdedNodes
    

    then restart. No models, no unusual dependencies.

    Troubleshooting

    If it doesn't show up in the node menu right after installing, restart the server and hard-refresh your browser tab - that resolves the large majority of "installed but not visible" cases and isn't specific to this pack.

    This is one of the areas of the pack worth being genuinely cautious about long-term: Derfuu's string-handling nodes are specifically the ones that have been reported disappearing across updates in the past - a user described the pack's "pre text" and "app text" nodes getting deleted outright on an update rather than kept as a deprecated legacy version, breaking workflows that depended on them with no warning. If a prompt-building workflow you downloaded relies on string nodes from this pack and starts throwing missing-node errors after you update, that's the most likely explanation - check the pack's GitHub for a renamed replacement, and consider pinning to your current installed version if the workflow is important and you don't want to risk a future update breaking it.

    CategoryDerfuu_Nodes/Functions/String Operations

    Inputs (3)

    NameTypeDefaultDescription
    PrependSTRING
    AppendSTRING
    DelimiterSTRING,

    Outputs (1)

    NameTypeDescription
    TEXTSTRING