comfyui-prompt-builder
ComfyUI node: Compose prompts from multiple toggleable text slots. Combine enabled entries or select one.
Nodes (1)
Prompt Builder
A ComfyUI custom node that lets you compose prompts from multiple toggleable text slots with a single output.
Why?
When working with Stable Diffusion prompts, you often want to keep reusable fragments (style tags, quality boosters, character descriptions, scene details) and mix-and-match them without copy-pasting. The built-in text nodes only give you a single text box each, so combining or switching between prompt variations requires multiple nodes and wiring.
Prompt Builder puts up to 10 text slots in a single node with per-slot enable/disable toggles.
Features
- Up to 10 text slots in a single node -- control how many are visible with the
slot_countwidget. - Per-slot ON/OFF toggle -- enable or disable each text entry independently.
- Two modes:
- Combine Enabled -- joins all enabled, non-empty texts with a configurable separator (default:
,). - Select One -- outputs text from a single selected slot number.
- Combine Enabled -- joins all enabled, non-empty texts with a configurable separator (default:
- Dynamic prompt support -- text entries support ComfyUI's
{wildcard|syntax}. - Clean UI -- unused slots are hidden automatically; adjust
slot_countto show only what you need.
Installation
Via ComfyUI Manager (recommended)
Search for "Prompt Builder" in the ComfyUI Manager and click Install.
Via ComfyUI Registry
comfy node registry-install comfyui-prompt-builder
Manual
cd ComfyUI/custom_nodes
git clone https://github.com/kymeraj/comfyui-prompt-builder.git prompt_builder
Restart ComfyUI.
Usage
- Add the Prompt Builder node (category:
utils/text). - Set
slot_countto the number of text entries you need (1--10). - Type your prompt fragments into each
text_Nfield. - Toggle each slot ON or OFF with the
enable_Nswitch. - Connect the
promptoutput to a CLIP Text Encode or any STRING input.
Combine mode
All enabled, non-empty slots are joined with the separator string. For example, with separator , :
| Slot | Text | Enabled | |
|------|------|---------|-|
| 1 | 1girl, solo | ON | |
| 2 | masterpiece, best quality | ON | |
| 3 | dark background | OFF | |
Output: 1girl, solo, masterpiece, best quality
Select mode
Set mode to Select One and use the select widget to pick which slot number to output.