Nodes/ComfyUI Warper Nodes/Combine Prompts (Warper)
ComfyUI Node

Combine Prompts (Warper)

Glue prompt fragments together without a mangled comma

By AIWarper·Created about a year ago·Updated 8 months ago· 14
Combine Prompts (Warper)
    • combined_prompt
    prompt1
    prompt2
    prompt3
    prompt4
    separator,
    prefix
    suffix

    Prompt-building in ComfyUI gets verbose fast. You want a subject fragment from one source, a style fragment from another, maybe a quality tag always appended, and if you wire raw STRINGs into a single line yourself you end up with , , in all the wrong places. Combine Prompts (Warper) is the tidy middleman: up to four prompt inputs, joined with a separator you control, with an optional prefix and suffix. It skips empty inputs, trims whitespace, and hands back one clean string.

    It's part of the prompt-loading trio in ComfyUI Warper Nodes, the niche pack from workflow author AIWarper. Used by itself it's a small convenience; paired with the pack's Load Prompts from Directory (Warper) or Text File Iterator (Warper), it becomes the formatting stage that turns a folder of prompt fragments into a consistently-built final prompt.

    How it works

    All seven inputs are optional, which is the point. prompt1 through prompt4 accept STRING wires (they're marked forceInput, so you can't just type into them - they exist to be wired). The node collects the non-empty ones, trims each, and joins them with separator (default ", "). Then prefix and suffix wrap the result. No non-empty inputs? You get back an empty string rather than an error, which is a sensible fail-soft. Output is a single combined_prompt string you can feed straight into a CLIP text encoder.

    The inputs you'll actually set:

    • prompt1prompt4 - the fragments, wired from other nodes or a text input you've exposed.
    • separator - default ", " is right for comma-separated prompt style. Want sentence-style? Use ". " or a space. This is the one most people customize.
    • prefix / suffix - header and footer text, e.g. a consistent "masterpiece, best quality" suffix on every generation.

    Installing it

    Standard Warper install, same for every node in the pack. ComfyUI Manager → search "ComfyUI-WarperNodes" → install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AIWarper/ComfyUI-WarperNodes
    # restart ComfyUI
    

    Pure string handling, so no dependencies beyond what ComfyUI ships. The README's RAFT model download is only relevant to the Flow Visualizer node.

    Common issues

    The forceInput behavior catches people: you can't type into prompt1 directly, because the node assumes inputs are wired. If you want to hardcode a fragment, feed it through a plain text/STRING node first. The empty-string fail-soft also means a silently missing source produces an empty prompt and a blank generation rather than an error - which is exactly the kind of failure that hides. If your combined output is empty, check that something is actually wired in, not that the node is broken. And remember the separator is a literal string: newlines don't do what you might hope for multi-line conditioning, so for most diffusion use cases keep it to ", " or a space.

    CategoryWarper Tools/Prompts

    Inputs (7)

    NameTypeDefaultDescription
    prompt1optSTRING
    prompt2optSTRING
    prompt3optSTRING
    prompt4optSTRING
    separatoroptSTRING,
    prefixoptSTRING
    suffixoptSTRING

    Outputs (1)

    NameTypeDescription
    combined_promptSTRING