Bubba Simple Prompt Builder
Bubba Simple Prompt Builder
- pipe
- metadata
- clip
- pipe
- metadata
- positive
- negative
- positive_prompt
- negative_prompt
- expansion_report
Bubba Simple Prompt Builder is where you go when you want your prompt to change between runs without you touching anything. It's a wildcard and random-choice engine with a prompt-cleaner bolted on: type a prompt with {red|blue|green} inline choices or __lighting__ file wildcards, and it expands them deterministically from a seed, cleans up the result, and optionally encodes it into conditioning if you feed it a CLIP. Same seed, same image every time. Change the seed, get a different pick from the same pool.
If that syntax rings a bell, it's the old A1111 wildcard system, and the KB's prompt-engineering essay notes it's still alive because it's genuinely useful for batch exploration. The modern no-code alternative is asking an LLM to rewrite your prompt each run, but wildcards are free, offline, and - crucially - reproducible. That reproducibility is the whole point: you can regenerate the exact same prompt later because the expansion is seeded, not random.
How it works
You type a prompt into positive (and optionally negative). The builder scans it for two token types:
{option1|option2|option3}- inline choices, one picked per run.__wildcard__- a text file's worth of choices, one per line, loaded from the pack'sdata/wildcardsfolder.__lighting__,__poses__,__locations/nightclub__, even a whole__species/...__namespace with dog breeds, felids, dragons, and cryptids if you want them.
Expansion is seeded by prompt_seed (default −1, which inherits the seed from pipe metadata, falling back to 0). Wildcards can expand recursively up to a safe depth, missing files and cycles are reported instead of crashing, and you can escape a literal { or __ with a backslash - \{red|blue\} types the braces literally. After expansion, cleanup normalizes whitespace and separators, and dedupe strips duplicate tags case-insensitively while keeping the first spelling and order.
The pipe inputs let it slot into a Bubba workflow: feed it the pipe and it writes the expanded prompts into pipe metadata. Connect a clip and it also hands you ready-to-sample positive and negative conditioning outputs - the CLIP text-encode step becomes free.
The outputs that matter
positive_prompt/negative_prompt- the final expanded text, after cleanup and dedupe. This is what you want to display or save.positive/negative- CONDITIONING outputs, only populated when a CLIP is connected.expansion_report- a string describing what was expanded and picked. Great for debugging "why did my prompt turn into that."
How to install it
Standard Bubba_Nodes pack install: ComfyUI Manager → "Bubba Nodes" → install → restart, or
cd ComfyUI/custom_nodes
git clone https://github.com/bubbafett5611/bubba_nodes.git
restart, then pip install -r requirements.txt if anything's missing (it's just aiohttp and pydantic). Needs ComfyUI v0.27.0+ for the V3 node API. The wildcard files ship with the pack - no model downloads.
Gotchas
Two things trip people up. First, the prompt_seed of −1 inherits the generation seed, which is usually what you want - but if you expected a fresh random prompt on every run and you're also using a fixed seed, you'll get the same prompt every time. Set prompt_seed to a non-negative value (or randomize it) to decouple them. Second, the after-generate control on the seed behaves like every other seed control in ComfyUI - see the control_after_generate trap in the node-plumbing docs, and set "widget control mode" to Before if you haven't. Also, remember negative-prompt syntax like (word:1.3) is not expanded here and won't do what you think on newer LLM-encoded models anyway - the KB's prompt essay is blunt about that being dead weight on modern checkpoints.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | STRING | — | |
| negative | STRING | — | |
| cleanup | BOOLEAN | true | — |
| dedupe | BOOLEAN | true | — |
| prompt_seed | INT | -1-1–4294967295 | — |
| pipeopt | BUBBA_PIPE | — | |
| metadataopt | BUBBA_METADATA | — | |
| clipopt | CLIP | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| pipe | BUBBA_PIPE | — |
| metadata | BUBBA_METADATA | — |
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| positive_prompt | STRING | — |
| negative_prompt | STRING | — |
| expansion_report | STRING | — |