Nodes/Prompt Factory/🪡 Merge Strings
ComfyUI Node

🪡 Merge Strings

The glue that turns a pile of fragments into one prompt

By satche·Created 2 years ago·Updated about a year ago· 5
🪡 Merge Strings
    • string
    separator,

    Meet the node

    🪡 MergeStrings is the unsung utility in the Prompt Factory pack - the node that stitches the random scene fragments into a single prompt you can actually feed to a text encoder. It lives under ⚙️ Prompt Factory → 🛠️ Utils, and in the pack's sample workflow it's doing the one job the fragment nodes can't: combining several separate tag strings into one.

    What you actually set

    It's a string joiner with exactly one setting that matters: separator, which defaults to ", ". Everything you wire in gets joined with that separator into a single output string. The default isn't an accident - comma-plus-space is the convention the tag-trained anime models (Pony, Illustrious, NoobAI) were trained on, and the spacing genuinely matters to those encoders. Leave it at the default unless you have a real reason.

    Where it sits

    Character, Clothes, Composition and Environment each emit their own STRING. MergeStrings pulls them together, and the merged string goes to CLIPTextEncode, then to the sampler. Nothing fancy, but it's the difference between five orphan tag lists and a coherent prompt.

    Honest take: if you're not running Prompt Factory's fragment nodes, you probably don't need this node specifically - string joining is a solved problem and plenty of other packs ship a version. It earns its keep as the glue in a Prompt Factory graph, where you have several fragments and one separator to rule them all.

    Install

    Same pack-level story as the rest of Prompt Factory: ComfyUI Manager → search "Prompt Factory", or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/satche/comfyui-prompt-factory
    pip install -r requirements.txt
    

    No models, no GPU dependencies - dpath and numpy are the whole list. Restart after install. If the clone 404s (it has been lately), Manager or comfy node registry-install comfyui-prompt-factory both work.

    Troubleshooting

    • Output looks glued together (slimblue eyes): the separator is empty. Set it back to ", ".
    • Prompt starts or ends with a stray comma: a fragment emitted nothing (its none pick) and the separator still landed. Cosmetic on tag models - don't chase it.
    • Output is basically empty: nothing is wired in. Every fragment you want in the final prompt has to be connected to this node.
    Category⚙️ Prompt Factory/🛠️ Utils

    Inputs (1)

    NameTypeDefaultDescription
    separatorSTRING,

    Outputs (1)

    NameTypeDescription
    stringSTRING