Wildcards Processor
One wildcard node with seven slots — the prompt mixer that scales
- STRING
Wildcards are the simplest way to make prompts non-repetitive: you write __style__ in your prompt, the node swaps in a random line from style.txt, and every run is a little different. Wildcards Processor is that concept turned into a seven-slot mixer - seven independent prompt segments, each of which can hold manual text, inline {a|b} choices, a wildcard file, or any combination.
If you've ever wanted "same pose, random outfit" or a batch of prompts where one segment varies and the rest stay fixed, this is a one-node answer instead of a tangled string of prompt-merge nodes. It's also deterministic - feed it a seed and it's reproducible, which matters more than you'd think when a random prompt accidentally produces something great and you want it back.
How it works
Each of the 7 slots pairs a multiline text box (prompt_1 … prompt_7) with a dropdown (wildcard_1 … wildcard_7). In the box you can write plain text and inline random choices: {cat|dog|fox} picks one at random. In the dropdown you pick a wildcard file - a .txt where each line is an option - or Random, which picks a random file from your collection for that slot. Both box and dropdown can be active at once; they get concatenated into that slot's segment, and the final output joins the non-empty segments with spaces.
Two details make it behave well. First, recursive expansion: a wildcard file can itself contain __other_wildcard__ references and they resolve too. Second, each slot runs on a seeded offset from the base seed - so even if two slots contain the identical {A|B} syntax, they won't stubbornly produce the same pick. That's the kind of thing that sounds minor until you've watched a "varied" prompt output identical images ten times.
Wildcard files are found in ComfyUI/wildcards/ first, then the plugin's own wildcards/ folder - same convention the rest of the ComfyUI wildcard ecosystem uses.
Inputs and outputs
Honestly: seed and whatever subset of the seven prompt boxes you need. The dropdowns are optional per slot. Output is one STRING - the fully expanded combined prompt - which feeds straight into a CLIP Text Encode.
Install
It lives in ComfyUI Text Processor, so install the pack once:
cd ComfyUI/custom_nodes
git clone https://github.com/rookiestar28/ComfyUI_Text_Processor.git
pip install -r requirements.txt
Or ComfyUI Manager → search "ComfyUI Text Processor" → Install → restart. Then put some wildcard files in ComfyUI/wildcards/ (or the pack's wildcards/ folder, where an example_format sample ships).
Gotchas
The dropdown list is read at node-load time - add a new wildcard file and you'll want to refresh before it shows up. And remember each slot's independent seed offset: if you want two slots to vary in sync rather than independently, this node actively fights you, which is usually the right call but worth knowing. For single-variable wildcard needs, a simpler one-slot node may be less ceremony - this one earns its keep when you're building layered, semi-random prompts.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00–18446744073709550000 | Base seed for deterministic inline choices and wildcard selection. |
| prompt_1 | STRING | First prompt segment; supports {a|b} and __wildcard__ syntax. | |
| wildcard_1 | COMBO | Optional wildcard file appended to the first prompt segment. | |
| prompt_2 | STRING | Second prompt segment; supports {a|b} and __wildcard__ syntax. | |
| wildcard_2 | COMBO | Optional wildcard file appended to the second prompt segment. | |
| prompt_3 | STRING | Third prompt segment; supports {a|b} and __wildcard__ syntax. | |
| wildcard_3 | COMBO | Optional wildcard file appended to the third prompt segment. | |
| prompt_4 | STRING | Fourth prompt segment; supports {a|b} and __wildcard__ syntax. | |
| wildcard_4 | COMBO | Optional wildcard file appended to the fourth prompt segment. | |
| prompt_5 | STRING | Fifth prompt segment; supports {a|b} and __wildcard__ syntax. | |
| wildcard_5 | COMBO | Optional wildcard file appended to the fifth prompt segment. | |
| prompt_6 | STRING | Sixth prompt segment; supports {a|b} and __wildcard__ syntax. | |
| wildcard_6 | COMBO | Optional wildcard file appended to the sixth prompt segment. | |
| prompt_7 | STRING | Seventh prompt segment; supports {a|b} and __wildcard__ syntax. | |
| wildcard_7 | COMBO | Optional wildcard file appended to the seventh prompt segment. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | Combined prompt text after wildcard and random-choice expansion. |