Extensions/comfyui-prompt-builder
ComfyUI Extension

comfyui-prompt-builder

ComfyUI node: Compose prompts from multiple toggleable text slots. Combine enabled entries or select one.

By kymeraj·Created 5 months ago·Updated 5 months ago· 1
kymeraj/comfyui-prompt-builder
Nodes1
On cloudLocal install
Categoryutils/text
Stars1
Updated5 months ago
Readme

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_count widget.
  • 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.
  • Dynamic prompt support -- text entries support ComfyUI's {wildcard|syntax}.
  • Clean UI -- unused slots are hidden automatically; adjust slot_count to 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

  1. Add the Prompt Builder node (category: utils/text).
  2. Set slot_count to the number of text entries you need (1--10).
  3. Type your prompt fragments into each text_N field.
  4. Toggle each slot ON or OFF with the enable_N switch.
  5. Connect the prompt output 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.

License

MIT