Combine Prompts (Warper)
Glue prompt fragments together without a mangled comma
- combined_prompt
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:
prompt1–prompt4- 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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt1opt | STRING | — | |
| prompt2opt | STRING | — | |
| prompt3opt | STRING | — | |
| prompt4opt | STRING | — | |
| separatoropt | STRING | , | — |
| prefixopt | STRING | — | |
| suffixopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| combined_prompt | STRING | — |