Nodes/Propmt Worker/Prompt Merger
ComfyUI Node

Prompt Merger

Eight inputs, one string, zero surprises

By lenskikh·Created 2 years ago·Updated about a year ago· 16
Prompt Merger
    • prompt
    prompt1
    prompt2
    prompt3
    prompt4
    prompt5
    prompt6
    prompt7
    prompt8

    The pack's stitch-together node. Prompt Merger takes up to eight STRING inputs - prompt1 through prompt8, all optional - and returns a single comma-joined string. That's the whole job. The README describes it as the node that "combines prompts from other nodes" and notes it automatically puts a comma at the end; the shipped code actually exposes eight inputs rather than the four the README's screenshot shows.

    How it works

    Concatenation with commas, plus a trailing one no matter what. Nothing smarter - no dedupe, no cleaning, no filtering. It's the plumbing node of this pack: constructor output, clothes, body, a translated block, and your handwritten line all collapse into one string before you encode it. That's a nicer graph than a daisy-chain of Concat nodes from a utility pack, and one node with eight labelled inputs reads a lot better in a workflow you share.

    The inputs that matter

    • prompt1 … prompt8 - STRING inputs, all optional, all forceInput-friendly so you can wire them or type into them. Use two if you only need two; leave the rest alone.
    • prompt (STRING output) - the merged result. Run it through the Prompt Worker node for cleaning, or straight into Clip and Text -> Encode.

    Gotchas

    • Empty inputs leave stray commas. Merge prompt1="a" with nothing else and you get something like a,,,, - harmless to the encoder, ugly to read. Wire only the inputs you actually use.
    • It doesn't clean anything. Merge the same tag from two sources and both survive, with duplicate commas where inputs are empty. If you want dedupe, lowercase, or blacklist filtering, that's the Prompt Worker node's job - feed it this node's output.
    • The trailing comma is deliberate (the author's style) and ComfyUI's encoder doesn't care about it.

    Why you'd bother

    In the canonical flow for this pack, the Merger is the middle of the funnel: Clothes and Body feed the Сonstructor, the Сonstructor feeds a Merger along with your own line and maybe an auto-translation node, the Merger's output goes to the Worker for cleanup, then to an encoder. When you're juggling five text sources, one labelled merge point is worth more than a pile of hidden concatenations.

    Install

    Pack-wide, no extra dependencies:

    cd ComfyUI/custom_nodes
    git clone https://github.com/lenskikh/ComfyUI-Prompt-Worker
    

    Restart ComfyUI (or install via ComfyUI Manager - the registry title is misspelled "Propmt Worker", so search both spellings). No models, no keys.

    CategoryPrompt Worker

    Inputs (8)

    NameTypeDefaultDescription
    prompt1optSTRING
    prompt2optSTRING
    prompt3optSTRING
    prompt4optSTRING
    prompt5optSTRING
    prompt6optSTRING
    prompt7optSTRING
    prompt8optSTRING

    Outputs (1)

    NameTypeDescription
    promptSTRING