Wildcard Prompt
Stop writing forty prompts by hand
- processed_text
If you've ever queued up thirty generations of the same prompt hoping they'd come out different, you already know the pain this node fixes. The DuoUmi Wildcard node (display name "Wildcard Prompt") turns your prompt into a slot machine: drop a few __placeholders__ in the text, hit queue, and every run rolls a new combination of subject, outfit, lighting, pose, artist - whatever you bracketed. It's the ComfyUI version of a trick the A1111 crowd has been using for years, and it's still the easiest way to batch out genuine variety without touching the seed roulette.
What it actually does
The node reads a prompt that contains three kinds of syntax and expands them into a finished string:
__filename__picks one random line from a.txtfile{a|b|c}picks one option from a brace group<[Tag]>picks a random entry from a structured.yamllibrary by tag
The output is one fully-resolved prompt. Wire it into CLIP Text Encode's positive input and your pipeline is unchanged - you just never type the same prompt twice. This is the exact dynamic-prompt family that Impact Pack also ships (its wildcard syntax is a load-bearing part of ComfyUI), so if you've seen __x__ and {a|b} before, that's why: old A1111 wildcard syntax that most people who arrived after 2024 never learned.
The mechanics are simple and worth knowing because they explain the gotchas. Every run it calls random.seed(seed) with your input seed, then loops up to 20 recursive passes expanding wildcards until nothing is left - so wildcard files can contain other wildcards. Text files live in the pack's wildcards/ folder and get cached by default, lines starting with # are treated as comments, and range picks like __1-3$$mood__ grab multiple lines and join them with commas. It also auto-converts Artist:Name tokens to @name (lowercase) for Pony/Danbooru models and cleans up double commas.
The inputs that matter
Three inputs, and honestly two of them do all the work:
- text - your prompt with wildcards in it. The default is a perfectly good example to crib from.
- seed - the dice roll. Same seed, same picks. Connect it to your KSampler seed to keep wildcards and image in sync, or give it its own value to vary them independently.
- autorefresh - set to Yes when you're editing wildcard files live (reloads them every run, slower). Leave it No when you're actually generating.
The single output, processed_text, goes straight into your CLIP Text Encode. That's the whole data flow.
Installing it
ComfyUI Manager: search DuoUmiWildcards. Or by hand:
cd ComfyUI/custom_nodes/
git clone https://github.com/UndefinedUo/DuoUmiWildcards
Then restart ComfyUI. The nodes appear under the DuoUmiWild category. There are no dependencies, no requirements.txt, no model downloads - it's pure Python stdlib, which is refreshing. One note: the README inside the repo still tells you to clone ComfyUI_DuoUmiWild.git, the old repo name. If that URL 404s, that's why; the repo is now DuoUmiWildcards.
Where people get burned
The big one, and it'll bite you on day one: the README describes a huge bundled library - 300+ series files, pose YAMLs, artist names. The current repo does not ship any of that. The shipped wildcards/ folder is empty, and the .gitignore literally says users populate it themselves. So don't go looking for __characters/Series Girls/Vocaloid FEM__ to work out of the box. You bring your own .txt files (drop them in custom_nodes/DuoUmiWildcards/wildcards/) or pull a community wildcard collection.
Other classics: same output every run means you're on a fixed seed - change it. "Wildcard not found" usually means a filename typo, and on Linux/Mac matching is case-sensitive. And if you're using a Pony-based model, remember the underscore-only score tags (score_9, not score 9) and the @artist format, or your "art" slider does nothing.
Fair warning: this is a small personal pack with zero community footprint on Reddit - expect the polish level of one very specific workflow, not a battle-tested ecosystem. But as a wildcard engine with YAML tag selection and prefix/suffix injection, it's genuinely solid, and it comes free in the same pack as a handy ratio selector.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | masterpiece, best quality, score_7, safe, 1girl, {smiling|neutral|shy} expression, __subject__, __style__ | — |
| seed | INT | 00–18446744073709550000 | Seed for random selection. Use the same seed for consistent results. |
| autorefresh | COMBO | No | Yes: reload wildcard files each time (slower, see edits immediately). No: cache files (faster). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| processed_text | STRING | — |