Nodes/scorpiov-nodes/Scorpiov Wildcard Processor 🎲
ComfyUI Node

Scorpiov Wildcard Processor 🎲

Wildcards, LoRA tags, and conditioning in one node

By scorpiovΒ·Created 3 months agoΒ·Updated 9 days agoΒ· 2
Scorpiov Wildcard Processor 🎲
  • model
  • clip
  • conditioning
  • model
  • clip
  • processed_text
β—„textmasterpiece, {girl|boy}, __hairstyles__β–Ί
β—„moderandomβ–Ί
β—„seed0β–Ί
β—„serial_start_line1β–Ί

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) or serial. 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/clip outputs 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.

CategoryScorpiov/Prompt

Inputs (6)

NameTypeDefaultDescription
modelMODELβ€”
clipCLIPβ€”
textSTRINGmasterpiece, {girl|boy}, __hairstyles__β€”
modeCOMBOrandom2 options: random, serial
seedINT00–18446744073709550000β€”
serial_start_lineINT11–9999Serial mode: which line to start from (1 = first). Applies to all wildcards in this prompt.

Outputs (4)

NameTypeDescription
conditioningCONDITIONINGβ€”
modelMODELβ€”
clipCLIPβ€”
processed_textSTRINGβ€”