Nodes/comfyui-adaptiveprompts/πŸ”— String Append πŸ”—
ComfyUI Node

πŸ”— String Append πŸ”—

Glue three strings together with a chosen separator

By AlectricitiΒ·Created 12 months agoΒ·Updated 23 days agoΒ· 87
πŸ”— String Append πŸ”—
    • STRING
    β—„string_1β–Ί
    β—„string_2β–Ί
    β—„string_3β–Ί
    β—„combine_modeCommaβ–Ί

    This is the plainest utility in the whole pack, and you'll end up using it constantly as connective tissue between the fancier prompt nodes - stitching a base prompt, a block of LoRA tags, and a trailing quality-tag string into one piece of text, or reassembling PromptSplitter's Trimmed/Scraps outputs back together in a different order than they started.

    How it works

    Feed it up to three strings and pick a combine_mode: None concatenates with nothing between them, Space, Underscore, and Comma insert that character between each piece, and Newline stacks them on separate lines. That's the entire node - no dynamic prompt resolution, no randomness, just a consistent join.

    The README notes this node "comes in a 3 and 8 version" for when three strings genuinely isn't enough to combine in one pass - worth knowing that a bigger sibling exists in the pack if you find yourself chaining two of these together just to combine four or five sources.

    The inputs and outputs that matter

    • string_1, string_2, string_3 (all multiline) - the pieces to combine.
    • combine_mode - None, Space, Underscore, Comma, or Newline.
    • Output: a single STRING with everything joined.

    How to install it

    Ships with the rest of the pack, no separate install. Search comfyui-adaptiveprompts in ComfyUI Manager, or clone it directly:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Alectriciti/comfyui-adaptiveprompts
    

    Restart ComfyUI afterward. No models, no dependencies.

    Common issues & troubleshooting

    Leftover punctuation when a slot is empty. If you leave string_3 blank while using Comma mode, most string-join implementations still insert a separator between the populated strings and the empty one - which can leave you with a trailing comma or a double comma in the output. Run the result through PromptCleanup with cleanup_commas on if you're chaining several append nodes and ending up with ragged punctuation at the seams.

    You need more than three sources. Chaining two 3-string nodes together works, but it's clunkier than it needs to be - check whether the pack's larger append node (the "8 version" the README references) covers your case in one node instead.

    Mixing combine_mode expectations across a chain. If node A joins with Comma and node B (fed one of A's outputs) joins with Space, the result reads inconsistently - decide on one separator convention for a given prompt pipeline and stick with it end to end rather than switching modes node to node.

    An empty input isn't the same as skipping that slot. Passing an empty string into string_2 still leaves a gap for combine_mode to insert a separator around, which is usually where the trailing- or double-punctuation problem above actually comes from - if you don't have a third piece to add, it's often cleaner to leave that portion of your graph out of the append chain entirely rather than wiring in a blank string and cleaning up after it.

    Categoryadaptiveprompts/utils

    Inputs (4)

    NameTypeDefaultDescription
    string_1STRINGβ€”
    string_2STRINGβ€”
    string_3STRINGβ€”
    combine_modeCOMBOComma5 options: None, Space, Underscore, Comma, Newline

    Outputs (1)

    NameTypeDescription
    STRINGSTRINGβ€”