Scorpiov Wildcard Processor π²
Wildcards, LoRA tags, and conditioning in one node
- model
- clip
- conditioning
- model
- clip
- processed_text
Wildcards are how you turn one prompt into a thousand. The idea is old - it's A1111-era dynamic-prompt syntax that most people arriving after 2024 never learned - and it's simple: write a __hairstyles__ woman, {studio|street|golden hour} and each run rolls a different hairstyle from a file and a different setting from the inline group. Scorpiov Wildcard Processor is the all-in-one version: it resolves wildcards, resolves inline {a|b|c} groups, loads any <lora:...> tags it finds, and outputs the finished CONDITIONING - plus the model, clip, and resolved text. One node replacing the usual "wildcard node β CLIPTextEncode β LoraLoader" tangle.
How it works
The inputs are the giveaway that this is the heavyweight variant: it takes model and clip directly, because it can load LoRAs itself and it encodes the conditioning itself. The full set:
text- your prompt template, with__file__references and{a|b|c}groups (nested groups supported).mode-random(seeded) orserial. Serial remembers position and loops through the file, which is what makes the Batch Prompt Runner tick.seed- controls random-mode picks.serial_start_line- which line serial mode starts from (1 = first), applying to all wildcards in the prompt.
Wildcard .txt files live in the pack's wildcards/ folder, referenced by filename only (__hairstyles__, no path) - any subfolder depth works. Comments are supported both in .txt files and in the node's text box: # to end of line, and C-style /* ... */ blocks that can span lines. They're stripped before any wildcard resolution, so they never reach the resolved prompt, Save Image, or embedded metadata. There's a live π¨ Highlighted Preview under the text field, color-coding groups, weights, numbers, and comments as you type - read-only, just a visual aid, but a genuinely nice one for debugging a gnarly template.
Outputs: conditioning (ready for a KSampler), the LoRA-applied model and clip (so downstream loaders can chain), and processed_text (the resolved string, handy for display or for wiring into Save Image's prompt inputs).
Where it sits
This is the "just do the whole thing" node. The text-only sibling - Wildcard Prompter - deliberately has no model/clip inputs and only outputs the string, for when you want to resolve text first and decide later. The Processor is for when you want the pipeline collapsed: template in, conditioning out, LoRAs along for the ride.
Two implementation details worth knowing. IS_CHANGED returns NaN, which tells ComfyUI this node must re-run every time - that's what makes random mode actually roll fresh picks. And the resolved text is printed to the server console on each run, which is either a debugging gift or log noise depending on how much you batch.
Gotchas
- The wildcards folder lives inside the pack folder, not in your main config. Drop files in
ComfyUI/custom_nodes/scorpiov-nodes/wildcards/. There's a "π Refresh Wildcards" button on the node that rescans the folder and resets serial state - use it after adding files, because the index is built once and cached. - A missing wildcard file resolves to its literal
__name__text with a log warning, so a typo shows up as a prompt that contains__hairsyles__as plain words. That's the classic silent failure; the highlighted preview helps you catch it before you queue. - LoRA tags are loaded at full pack strength - wire the node's
model/clipoutputs onward, not the originals, or the LoRAs silently drop.
Installing
Part of scorpiov-nodes. Install via ComfyUI Manager (search "scorpiov-nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/vikramudyawar/scorpiov-nodes
Restart ComfyUI after. No extra Python dependencies, no models to download - just the wildcard .txt files you bring. If you've been hand-rolling {a|b|c} prompts in your head, this is the node that makes batch variety one template away.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | β | |
| clip | CLIP | β | |
| text | STRING | masterpiece, {girl|boy}, __hairstyles__ | β |
| mode | COMBO | random | 2 options: random, serial |
| seed | INT | 00β18446744073709550000 | β |
| serial_start_line | INT | 11β9999 | Serial mode: which line to start from (1 = first). Applies to all wildcards in this prompt. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | β |
| model | MODEL | β |
| clip | CLIP | β |
| processed_text | STRING | β |