ComfyUI Node

prompt - join

Seven prompt strings, one clean comma-joined prompt

By YMC-GitHub·Created 3 years ago·Updated about a year ago· 20
prompt - join
    • STRING
    a
    b
    c
    d
    e
    f
    g

    Once you start building prompts from blocks - subject here, style there, quality tags on top - you need something to glue the pieces together without leaving stray commas and double spaces behind. prompt - join takes up to seven text inputs and merges them into one comma-separated prompt, running the whole thing through the pack's standard cleanup as it goes.

    The block-building workflow this enables is the ComfyUI way of doing what the KB's prompt-engineering doc describes for SDXL lineage: earlier keywords carry stronger attention, so people assemble prompts as ordered groups - character, then pose, then environment, then quality - and join them so the order stays deliberate. This node is the seam between those groups.

    How it works

    It concatenates inputs a through g with commas, then normalizes: each tag gets trimmed, runs of spaces collapsed, empty entries dropped, and the result rejoined. So an empty input doesn't leave you with ,,, - empties are filtered out.

    A genuinely useful quirk: because the join is literal comma-concatenation, each input can be anything - a block of tags, a single word, even another node's output - and the cleanup handles the seams. Want to drop one block? Bypass its input and the join still produces clean text. It also displays the result as a UI text preview, which makes it a decent place to look at your assembled prompt before it hits the encoder.

    Inputs and outputs

    • a through g - seven STRING inputs. Leave any unused ones empty; they're filtered out.
    • STRING output - the joined, cleaned prompt

    That's the entire surface. Seven in, one out.

    Installing it

    Same pack, same one-time install:

    • ComfyUI Manager → search ymc-node-suite-comfyui → Install → restart, or
    cd ComfyUI/custom_nodes
    git clone https://github.com/YMC-GitHub/ymc-node-suite-comfyui
    

    restart, and pip install -r requirements.txt if you cloned manually (four small yors_* helpers; the pack's auto-install is commented out in source). No models, no GPU - string work only.

    Find it via canvas search (prompt / join) or the right-click ymc suite menu.

    Common issues

    • "I only need two inputs." Fine - leave c through g blank. The node doesn't complain, and empties are filtered out of the output.
    • Order is the whole point. The join is a,b,c,d,e,f,g in that exact order, and on SDXL-lineage models earlier position means stronger attention. Put your most important block in a, not g.
    • Multi-line inputs get joined raw. If an input has newlines, they survive inside the string (this isn't tags_onelineify). Feed it through prompt - std or prompt - input upstream if you want line breaks collapsed to commas first.
    • WAS Node Suite conflicts on the pack's io/save nodes are a possible warning if you run both packs - doesn't affect this node, but it's the usual "why is Manager complaining" answer after installing ymc.

    There are also join text nodes elsewhere in the pack (a plain-text variant in the same ymc suite tree), but this prompt-flavored one adds the tag cleanup on top, which is what you want for prompt assembly.

    Categoryymc suite/text

    Inputs (7)

    NameTypeDefaultDescription
    aSTRING
    bSTRING
    cSTRING
    dSTRING
    eSTRING
    fSTRING
    gSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING