Nodes/ComfyUI-PromptDrafter/String Combiner - PromptDrafter
ComfyUI Node

String Combiner - PromptDrafter

Stop hand-joining prompt parts

By Carasibana·Created 8 months ago·Updated 6 months ago· 2
String Combiner - PromptDrafter
    • combined
    input_count2
    string_1
    string_2
    string_3
    string_4
    string_5
    string_6
    string_7
    string_8
    string_9
    string_10
    string_11
    string_12
    string_13
    string_14
    string_15
    string_16
    string_17
    string_18
    string_19
    string_20
    string_21
    string_22
    string_23
    string_24
    string_25

    ComfyUI's plumbing layer is full of small nodes whose only job is to keep you from typing the same thing twice, and String Combiner - PromptDrafter is a good one of those. It takes up to 25 input strings and joins them into one output with a , separator - and, unlike doing it by hand, it handles the ugly edge cases. No double commas, no trailing ones, blank inputs simply skipped. If you're assembling a prompt from several sources (a subject from one node, a quality string from another, a style tag from a third), this is the node that glues them together before the text hits your encoder.

    It's the kind of utility that looks trivial until you've debugged a prompt that reads masterpiece, best quality,, portrait, , detailed eyes. The smart comma handling exists precisely so that output never happens. Any input with leading or trailing commas gets them stripped before joining, and empties are ignored entirely.

    What you actually set

    The schema is genuinely small:

    • input_count - an integer from 2 to 25, default 2. It controls how many input slots are visible. Show only the three you need; the rest stay hidden.
    • string_1 through string_25 - optional text inputs. Only the count you chose in input_count are shown, and unconnected or blank ones are silently ignored at combine time.
    • combined - the single STRING output. Wire it into a CLIP Text Encode, or into a PromptDrafter node's prefix/suffix input if you want it glued onto a larger prompt.

    Because every input is forceInput, they present as sockets rather than widgets - this node is designed to be fed by other nodes, not typed into. A typical setup: a quality-tags string from a Single PromptDrafter node and a subject string from somewhere else both land here, and combined goes to the positive CLIP encode.

    Installing and the gotcha that's fixed now

    Install via ComfyUI Manager (search "PromptDrafter") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Carasibana/ComfyUI-PromptDrafter
    

    Restart after. No dependencies beyond ComfyUI itself, no model files - it's pure string work.

    The one real gotcha this node had is already in the changelog, which matters if you're on an old version: input connections used to get dropped on workflow reload or when you changed input_count. That was a LiteGraph timing bug, fixed in v1.2.1 by moving the input reconciliation from node-creation time to after the graph is fully wired. If you're seeing connections vanish when you reopen a workflow, update the pack rather than re-wiring everything by hand. And one quirk to expect: the node is always-dirty, so it re-runs every generation - which for a pure string joiner is harmless, just slightly more work than strictly needed.

    CategoryPromptDrafter

    Inputs (26)

    NameTypeDefaultDescription
    input_countINT22–25
    string_1optSTRING
    string_2optSTRING
    string_3optSTRING
    string_4optSTRING
    string_5optSTRING
    string_6optSTRING
    string_7optSTRING
    string_8optSTRING
    string_9optSTRING
    string_10optSTRING
    string_11optSTRING
    string_12optSTRING
    string_13optSTRING
    string_14optSTRING
    string_15optSTRING
    string_16optSTRING
    string_17optSTRING
    string_18optSTRING
    string_19optSTRING
    string_20optSTRING
    string_21optSTRING
    string_22optSTRING
    string_23optSTRING
    string_24optSTRING
    string_25optSTRING

    Outputs (1)

    NameTypeDescription
    combinedSTRING