Nodes/Bubba Nodes/Bubba Simple Prompt Builder
ComfyUI Node

Bubba Simple Prompt Builder

Bubba Simple Prompt Builder

By bubbafett5611·Created 5 months ago·Updated 2 months ago· 0
Bubba Simple Prompt Builder
  • pipe
  • metadata
  • clip
  • pipe
  • metadata
  • positive
  • negative
  • positive_prompt
  • negative_prompt
  • expansion_report
positive
negative
cleanuptrue
dedupetrue
prompt_seed-1

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's data/wildcards folder. __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.

CategoryBubba Nodes/Prompt

Inputs (8)

NameTypeDefaultDescription
positiveSTRING
negativeSTRING
cleanupBOOLEANtrue
dedupeBOOLEANtrue
prompt_seedINT-1-1–4294967295
pipeoptBUBBA_PIPE
metadataoptBUBBA_METADATA
clipoptCLIP

Outputs (7)

NameTypeDescription
pipeBUBBA_PIPE
metadataBUBBA_METADATA
positiveCONDITIONING
negativeCONDITIONING
positive_promptSTRING
negative_promptSTRING
expansion_reportSTRING