Lumi Wildcard Processor
Wildcards, the ComfyUI way — random picks from your own word banks
- processed text
If you've ever wanted "a random color, a random location, a random style" without hand-rolling ten prompt variations, wildcards are the answer - and Lumi Wildcard Processor brings that to your ComfyUI graph. You write a prompt with wildcard references like __color__ and __location__, the node picks a random value for each from your word-bank files, and it hands back the fully resolved prompt. One queue run becomes a surprise, and with a seed you can make that surprise reproducible.
The engine underneath is the dynamicprompts library - the same machinery behind Impact Pack's wildcards and A1111's dynamic prompts - so the syntax is the familiar one: __name__ references a file of options, and the richer {a|b|c} alternative syntax works too. The node is an explicit descendant of Impact Pack's Wildcard Processor, which is a strong pedigree for a utility this boring-looking.
The inputs that matter
- wildcard_text - your prompt written with wildcard syntax, e.g.
a __color__ car in __setting__, sunset. - populated_text - where the resolved result lands. This is the widget you see, and the node writes the final pick into it - so you can always read exactly what got chosen. In some modes you can edit it yourself.
- mode - the three-way switch that makes this node actually smart:
populate(default) - overwritespopulated_textwith the processed result. You can't hand-edit the output here.fixed- ignoreswildcard_textentirely and usespopulated_textas-is (editable). Turn this on when you've found a resolution you like and want to lock it.reproduce- one-shot: behaves likefixedonce so you keep the current pick, then flips topopulatefor future runs.
- seed - makes the random picks reproducible; same seed, same wildcard values.
- select_wildcard (optional) - a dropdown of all your available wildcards, formatted as
__name__, so you can add one to the text without remembering filenames.
Output: processed text, a single STRING - the resolved prompt, ready for your encoder or an LLM pass.
Where the wildcards live
The node looks in several places, in priority order: the LUMI_WILDCARDS_PATH environment variable, any wildcards: paths you declare in ComfyUI/extra_model_paths.yaml, and the ComfyUI/wildcards folder. The YAML route is the clean one for a big library:
my_wildcards:
wildcards: D:/dev/wildcards
Each .txt file in those folders is one wildcard - colors.txt gives you __colors__, with one option per line. The node caches the list but invalidates on file changes, so dropping a new file in usually just works.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/illuminatianon/comfyui-lumi-tools
cd comfyui-lumi-tools
uv sync
Restart ComfyUI, or grab "Lumi Tools" from ComfyUI Manager. Note that dynamicprompts is one of the pack's two real dependencies, so the first launch after install pulls it in.
Where people get burned
The usual trio. First, an empty wildcard set: if the dropdown shows nothing, your files aren't in a path the node can see - check the YAML key name and the folder structure. Second, mode confusion: leaving it in populate and hand-editing populated_text does nothing, because the next run overwrites it - that's exactly what fixed is for. Third, forgetting that wildcards are random even between runs: if a render is great but unreproducible, you forgot to set the seed. And one honest note for LLM-encoded models: wildcard chunks like masterpiece are largely inert there - the resolved prompt still works, but the value of randomizing tag lists shrinks compared to SDXL-lineage models, where this node is a proper workflow staple.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| wildcard_text | STRING | Enter a prompt using wildcard syntax. | |
| populated_text | STRING | The actual value passed during execution. Wildcard syntax can also be used here. | |
| mode | COMBO | populate | populate: Overwrites 'populated_text' with processed 'wildcard_text'. fixed: Uses populated_text. reproduce: one-shot fixed then populate. |
| seed | INT | 00–18446744073709550000 | Random seed for wildcard processing. |
| select_wildcardopt | COMBO | Select the Wildcard to add to the text | 3 options: Select the Wildcard to add to the text, __samples/flower__, __samples/jewel__ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| processed text | STRING | — |