Nodes/Quality of Life Nodes for ComfyUI/Multiline Concatenate (Soze)
ComfyUI Node

Multiline Concatenate (Soze)

Glue up to ten text blocks into one prompt

By SozeInc·Created 2 years ago·Updated 3 days ago· 10
Multiline Concatenate (Soze)
    • STRING
    string1
    string2
    string3
    string4
    string5
    string6
    string7
    string8
    string9
    string10
    separator

    The plain job here: take up to ten separate blocks of text and glue them into one string, with whatever separator you choose sitting between them. The obvious reason to want this - building a prompt out of pieces that live in different parts of your graph. A fixed quality boilerplate block, a subject line coming out of a Load Random Line From Text File, a style tag from a dropdown elsewhere - instead of hand-wiring string concatenation logic, you drop them all into one node.

    How it works

    string1 is required; string2 through string10 are optional slots you fill as needed - leave the rest blank. separator sits between each filled block; it defaults to an empty string, so with nothing set you get a straight concatenation with no spacing added. Since each multiline block can already carry its own trailing newline or spacing, that often reads fine as-is - but if you want clean joins, set separator to something like ", " or a newline.

    The inputs and output that matter

    • string1 (required) through string10 (optional), all multiline - your text blocks.
    • separator - inserted between each block you've filled in.

    Output is STRING - the joined text, ready for a CLIPTextEncode or further processing.

    A typical layout: string1 is a fixed "quality" boilerplate block you never touch, string2 is the actual subject text coming from wherever you're driving prompts (a Load Random Line From Text File, a folder loader, a manual widget), string3 is a negative-space style tag, and separator set to ", " keeps them reading as one comma-separated prompt instead of a run-on block of text. The value over typing it all into one text box by hand is that each piece can now be swapped independently by whatever's upstream of it - change the subject source without touching your quality boilerplate.

    Installing it

    ComfyUI Manager: search ComfyUI_Soze. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/SozeInc/ComfyUI_Soze.git, pip install -r ComfyUI_Soze/requirements.txt, restart. No models, no dependencies beyond the pack - it's string handling.

    Common issues

    Ten slots is generous, but if you genuinely need more, chain two of these together: wire the STRING output of one into string1 of a second. That's a clean pattern here since blank optional slots are simply skipped rather than inserting stray separators for empty entries.

    This pairs naturally with the rest of the pack's string tools - clean the joined result with Special Character Replacer before it becomes a filename, or run it through Multi Find And Replace first to swap out placeholder tokens in any of the individual blocks before they're glued together.

    Categorystrings

    Inputs (11)

    NameTypeDefaultDescription
    string1STRING
    string2optSTRING
    string3optSTRING
    string4optSTRING
    string5optSTRING
    string6optSTRING
    string7optSTRING
    string8optSTRING
    string9optSTRING
    string10optSTRING
    separatoroptSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING