Wildcard Processor (Badman)
Resolve wildcard tokens without a full prompt-generation pack
- STRING
Wildcards are old-school prompt magic: instead of writing "photo of a woman with brown hair" and manually swapping "brown" for "blonde" every other run, you write a placeholder and let the node roll the dice for you. This is Badman's take on that idea - a lightweight node that takes a prompt string, scans it for wildcard tokens, and resolves each one against a wildcard text file, seeded so the result is reproducible.
Why you'd reach for this instead of Impact Pack's version
You've probably already met wildcards without knowing it - Impact Pack has shipped __wildcard__ and {a|b|c} syntax for years and a huge share of the ecosystem depends on it without crediting the source. If you already run Impact Pack, you don't strictly need this node. Where Badman's version earns a spot is when you want wildcard resolution as an isolated, single-purpose step in your graph - no detector models, no FaceDetailer machinery riding along, just "take this string, swap the placeholders, give me back plain text." That's useful if you're building a prompt-generation subgraph you want to keep lean, or if you're chaining this pack's own string nodes (Concat String, Select String from List) together and want the wildcard step to be just one link in that chain rather than a dependency on a much larger pack.
The other classic trick worth knowing, whether you use this node or Impact Pack's: the {this|that|the other} bracket syntax lets you pack several alternatives inline in one prompt and batch across them - no separate wildcard file needed for small variations. It's old A1111 syntax that a lot of people arriving after 2024 never learned, and it composes naturally with file-based wildcards for the bigger vocabulary lists.
Inputs and outputs
Two required fields, both plain:
prompt(multiline string) - your prompt text with wildcard tokens embedded wherever you want variation.seed(integer, default0, up to the standard ComfyUI 64-bit max) - controls which option gets picked for each wildcard. Same seed, same prompt in, same resolved prompt out - that's the whole point of giving this its own seed instead of reusing your sampler's noise seed. Bump it to reroll the wildcards without touching the actual generation seed, or lock it while you iterate on everything else.
One output: a resolved STRING, ready to feed straight into CLIPTextEncode or one of this pack's own string utilities.
Installing it
ComfyUI Manager: search ComfyUI-BadmanNodes, install, restart. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/MariusKM/ComfyUI-BadmanNodes
Restart and it's under the Badman category. No extra pip packages or model downloads called out in the README - wildcard substitution is string manipulation, not inference, so this is about as light an install as a custom node gets.
Common gotchas
The obvious one: the node resolves against wildcard text files, so if your wildcard file path or naming convention doesn't match what the node expects, tokens pass through unresolved and you'll end up feeding the literal wildcard syntax straight into your text encoder - which produces a prompt full of garbage tokens the model has no idea what to do with. If you get suspiciously literal output, that's the first thing to check.
Second, don't confuse this node's seed with your KSampler's seed - they're independent, deliberately. Locking this node's seed while randomizing the sampler seed gives you the same prompt across many different noise draws, which is usually what you actually want when you're testing how a fixed prompt behaves across seeds rather than testing wildcard variety itself.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| seed | INT | 00–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |