Prompt Wildcards ✨
Prompt Wildcards rolls your prompt for you
- Prompt
So you want every image in a batch to look different - different person, different lighting, different location - without hand-writing twenty prompts. ComfyUI already has a trick for this: wrap options in {a|b|c} and each run picks one. It works, but you type every option yourself, and the list lives inside the prompt. Prompt Wildcards is the version where the options live in curated CSV files: you drop a <tag> into the text and it silently swaps in a random value from a real list, every execution.
It's a single-node pack from ComfyUI-PromptUtils, and the whole thing ships in one file with zero dependencies. One prompt box in, one clean string out - nothing exotic.
How it works
Under the hood it's a regex substitution loop. The node keeps a dictionary mapping each supported tag to a CSV file bundled in custom_nodes/ComfyUI-PromptUtils/data/, and it replaces each <tag> in your prompt with a random line from that file until none are left. <nlt> pulls from nationalities.csv, <artist> from artists.csv - which is a 20,000-line Danbooru artist list, so that one alone gives you effectively endless variety. Celebrity, film, game, media, outfit, expression, pose, lighting, style, and a handful of NSFW variants (<outn>, <wordn>) round it out.
The date logic is where it gets slightly clever, and slightly cursed. <69-79> rolls a year from 1969–1979, <19xx> and <2xxx> fill in the pattern, and <xxxx> gives you any four-digit year. Here's the trap: the README documents <1980-1990> as "a random year between the two," but the code adds 1900 to whatever number it sees - so <1980-1990> actually yields 3880–3890. I ran it to confirm. Use the two-digit form; that's what the default prompt uses and it works fine.
The inputs that matter
- Prompt (multiline string) - your text with
<tag>placeholders. This is 95% of the node; the default value is a laundry list of every tag so you can see the vocabulary at a glance. - seed (int, 0–30000) - the whole point of having it. Same prompt + same seed reproduces the same roll, so you can lock a "good" combination or step the seed to explore. One quirk: the slider caps at 30,000, unusually low for ComfyUI, so you can't use your usual 1.7-billion seed habit here.
One output, Prompt (string), which wires straight into your CLIPTextEncode's positive prompt - or any other node that takes a string.
Installing it
Open ComfyUI Manager and search ComfyUI-PromptUtils, or:
cd ComfyUI/custom_nodes
git clone https://github.com/RunningOverGlowies/ComfyUI-PromptUtils
Restart ComfyUI. That's the whole install: the code is pure Python stdlib (no requirements.txt to satisfy), and the lists ship inside the repo, so there are no model files to download. The same pack also brings Filename Generator 📁, which fakes realistic camera filenames like DSC_0123.JPG to push photos-looking-real aesthetics - a fun sibling if you're into the film-camera prompting trick.
Where it fits
The KB's prompt-engineering doc tells the story: dynamic prompts via the {a|b|c} bracket syntax is how people build character reference libraries - batch 32, same person, different camera/lighting/mood, no training. Prompt Wildcards is the lazier cousin: you don't curate the options, the bundled lists do. It's less precise than writing {brown|blonde|black} hair yourself, but for broad variety across thousands of prompts it's faster than maintaining a wildcard file by hand. Pair it with a seed-stepping workflow and you get a free grid of variations for exploring a scene or stress-testing a LoRA.
Where people get burned: the four-digit year bug above, and expecting per-image rolls inside a single ComfyUI batch - ComfyUI reuses the same seed unless you drive it. Feed this node's seed from a varying source and batch-count your way to variety.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| Promptopt | STRING | Nationality: <nlt> Species: <species> Outfit: <out> Outfit (nsfw): <outn> Make-up: <makeup> Exression: <exp> Pose: <pose> Location (mundane): <loc> Location (weird): <locw> Celebrity: <celeb> Media: <media> Film: <film> Game: <game> Word: <word> Power-word: <wordp> Power-word (nsfw): <wordn> Password: <pass> Color: <color> Color keyword: <color2> Photo keyword: <wordk> Medium: <medi> Time of day: <time> Lighting: <light> Lighting (more): <light2> Styles: <style> Styles (more): <style2> Painting Style: <paintstyle> Years: <69-79>, <19xx>, <2xxx>, <xxxx> Danbooru Artist: <artist> Painter (with style): <painter> | — |
| seedopt | INT | 248570–30000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Prompt | STRING | — |