Wildcards Processor
Actually expand your wildcards, instead of pasting them into the sampler
- processed_text
- seed
Wildcards are the classic trick for varied prompts: you write a {red|blue|green} car, and each run picks one option. The catch is that something has to turn that syntax into an actual prompt - and if you're just shoving {...} straight into a CLIP text encode, nothing does. The Wildcards Processor is that something. It takes text with wildcard syntax, rolls the choices against a seed, and outputs a fully expanded prompt string you can feed to your sampler.
The old A1111-style {a|b|c} syntax never really died; it just moved. If you arrived after 2024 and never met it, the pattern is simple: { options separated by | } means "pick one of these." This node makes that work in ComfyUI.
How it works
Under the hood it uses the dynamicprompts library (which is why it's in the pack's requirements.txt - it's the one hard dependency this node can't live without). The flow:
- You feed text with wildcard syntax into the node.
- It builds a
RandomPromptGenerator, seeded by the seed input, and expands your text - all{...}groups and__file__-style references resolve to one concrete prompt. - use_attention toggles the generator's attention mode, which also handles emphasis syntax like
(word:1.2)for weighting. There's a small bonus: when that mode is on, the node post-processes the output to fix a known formatting artifact (stray(,)spacing from the generator). - The fully expanded processed_text comes out one output, and the seed used is echoed on a second output - so you can log which seed produced which variation, or feed it forward.
The inputs that matter
- text - your wildcard-laden prompt. Multiline, so paste freely.
- seed - controls the random choices. Same seed, same picks; change it and you get a different roll. This is the input you'll actually touch.
- use_attention - off by default. Turn it on when your prompts use weighted emphasis and you want it handled properly; it's slightly more expensive but produces cleaner output for
(word:1.2)style prompts. - Outputs: processed_text (
STRING) and seed (INT).
Why you'd reach for it
Two real-world patterns. First, straightforward prompt variation: {cinematic|golden hour|neon} style groups in your positive prompt, one run per seed. Second - and this is where it shines - pairing it with the pack's Wildcard Prompt Editor, which gives you an interactive web editor for building nested wildcard sets. The editor's output is a wildcard string; this node is the thing that turns it into a usable prompt. The README is explicit about the pairing: editor out, processor in, and you get real random wildcard processing with seed control instead of the same expanded text every run.
The honest caveat: for heavy variation work, dynamicprompts itself is a deep rabbit hole (nested files, cross-referencing wildcard files, weighted options). This node exposes the simple, sane slice of it - text in, expanded text out - without pretending to be a full wildcard system. If you need multi-file wildcard libraries, look at dedicated wildcard packs; if you need {this|that} to actually work, this is enough.
Install
The dynamicprompts dependency is in the pack's requirements.txt, so the standard install covers it:
cd ComfyUI/custom_nodes
git clone https://github.com/dadoirie/ComfyUI_Dados_Nodes.git
cd ComfyUI_Dados_Nodes
pip install -r requirements.txt
or ComfyUI Manager → "Dados Nodes". Restart after.
Common issues
If you get the same output every run, check your seed isn't fixed and that the syntax is right - {a|b} not (a|b), and no spaces around the pipes ({a | b} breaks the picker). If the node fails to load at all, dynamicprompts is missing - install the pack's requirements and restart. And remember the processor only expands; it doesn't roll per-image inside a batch, so for batch variation you'll want to vary the seed per item.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Text with wildcards to process | |
| seed | INT | 00–18446744073709550000 | Seed for wildcard randomization |
| use_attention | BOOLEAN | false | Use attention generator for emphasis |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| processed_text | STRING | — |
| seed | INT | — |