Prompt Builder 🔀
Prompt Builder (WildPromptor) — wrap content with a prefix and suffix
- prompt
- content_only
The README pitches this one as "LEGO for prompts," and that's about right - you snap together a prefix, some content, and a suffix into one prompt. It's the simplest of the pack's assembly nodes: three text boxes, joined in order. Where it earns its keep over a plain concatenate is the second output, which hands the middle back to you untouched.
Prompt Builder is part of WildPromptor by 1038lab (also the author of the ComfyUI-RMBG masking pack).
How it works
You put a fixed opener in prefix (your quality tags, a style anchor, whatever you always want in front), the variable part in content, and a closer in suffix. The node concatenates prefix + content + suffix into a finished prompt. That's the mechanism. Nothing magic - but the split into three named regions makes intent obvious and easy to rewire.
The inputs and outputs that matter
All three inputs - prefix, content, suffix - are optional multiline text. Fill what you need.
There are two outputs, and the second is the reason to use this node:
- prompt - a STRING list: the full prefix + content + suffix, ready for a CLIP Text Encode
- content_only - a single STRING carrying just the middle, unwrapped
That content_only passthrough is the useful trick. Say you've wrapped a generated subject in a fixed quality prefix/suffix for image generation, but you also want to feed the bare subject somewhere else - a filename, a caption, a second prompt with different framing. Instead of rebuilding it, you tap content_only. It keeps the raw middle available without you maintaining it in two places.
When you'd reach for it vs. Prompt Concat
Prompt Concat is the many-slot mixer for stitching several list-node fragments together. Prompt Builder is the two-bookend wrapper for a single content stream you want framed. Different jobs. If all you're doing is "always put these tags before and after whatever I'm generating," Builder is the cleaner, smaller node - and you get the unwrapped copy for free.
A structural aside worth keeping in mind: the prefix→content→suffix shape lines up with how modern encoders like a prompt organized - a stable frame around a variable core. Just keep each region lean; a bloated prefix of quality words does little on current models and eats attention on LLM-encoded ones.
Installing it
ComfyUI Manager: search ComfyUI-WildPromptor, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/1038lab/ComfyUI-WildPromptor
then restart. It's under 🧪AILab/🧿WildPromptor. No downloads needed.
Common issues
- Output has odd spacing where regions meet - the node joins your text as given; add or trim trailing spaces/commas in the boxes so the seam reads cleanly.
- I wanted just the middle and got the whole thing - you grabbed the wrong output.
promptis the wrapped version;content_onlyis the bare middle. promptis a list but my downstream wants a single string - that's expected for batch flows; if you need a scalar, pull fromcontent_onlyor route through a node that collapses the list.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| prefixopt | STRING | — | |
| contentopt | STRING | — | |
| suffixopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| content_only | STRING | — |