Nodes/ComfyUI_Eclipse/Wildcard Processor
ComfyUI Node

Wildcard Processor

Turn one prompt template into endless variations

By r-vageΒ·Created 10 months agoΒ·Updated a day agoΒ· 31
Wildcard Processor
    • processed_text
    β—„wildcard_textTry using __wildcard__ or {option1|option2}β–Ί
    β—„populated_textβ–Ί
    β—„modepopulateβ–Ί
    β—„seed0β–Ί
    β—„wildcardsβ–Ύβ–Ί
    β—„negative_promptβ–Ί

    Write one prompt template, generate a thousand different images from it. That's the whole pitch of wildcards, a trick that's been around since the A1111 days and still quietly powers most character-variation and dataset-generation workflows. Wildcard Processor is Eclipse's take on it: type A {red|blue|green} car, fix the seed, and every run picks a new combination - or the same one, if you want reproducibility.

    The syntax

    Three things to learn, and then you're dangerous:

    • Inline options: {option1|option2|option3} picks one at random. A {young|old} {man|woman} wearing {red|blue|green} clothes - multiple sets all roll independently.
    • File-based wildcards: {colors} pulls a random line from wildcards/colors.txt. This is where it scales - instead of typing thirty options, you point at a file. The pack ships an example wildcards/ folder and extracts its defaults on first launch.
    • Weighted options: {red:5|blue:3|green:1} makes red five times more likely than green. Use sparingly; most prompts don't need probabilities.

    Nested wildcards work too - a wildcard file whose lines reference other wildcard files - so you can build a hierarchy of reuse.

    The two modes and the seed

    mode is the thing that trips people up. In populate mode the node processes wildcard_text using the seed and writes the expanded result into populated_text. In fixed mode it ignores wildcard_text and uses populated_text as-is - which means you can generate an expansion, then edit the expanded text by hand and keep it. Think of it as "roll the dice" vs "keep what I rolled, then fiddle."

    The seed widget has the Eclipse family's special values: -1 randomizes each run, -2 increments from the last, -3 decrements. Same rules as everywhere in ComfyUI: fix the seed and the expansion is reproducible; change it and you get new output. This is the same seed discipline as the sampler, and the same gotcha - read the number before you queue, because "randomize after generate" can silently eat your good seed.

    There's also a negative_prompt input that filters comma-separated tags out of the final output after expansion - Raffle-style, so it doesn't influence selection, just scrubs unwanted tags from the result. And a wildcards dropdown for quick-inserting from your wildcard files.

    Where it earns its keep

    Beyond "nice variety," the two killer uses are batch character-reference libraries (one template, batch 32, get the same subject across cameras and moods with no LoRA) and dataset/prompt exploration for training. Wire processed_text into a CLIP Text Encode, connect a seed you control, and batch away. It's the kind of node that looks like a toy until you realize half your static prompts could be one template.

    Install it

    Part of ComfyUI_Eclipse. ComfyUI Manager β†’ search "Eclipse" β†’ Install β†’ restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/r-vage/ComfyUI_Eclipse
    

    On first launch the pack copies its default wildcard files into the repo's wildcards/ folder (and symlinks them under models/wildcards/smart_prompt/), and it never overwrites files you've edited. Put your own .txt files in ComfyUI_Eclipse/wildcards/. Standard deps apply; it's under Eclipse β†’ Text.

    Gotchas

    The classic failures: a {filename} reference to a file that doesn't exist (the node won't silently skip it - it errors or passes the literal through, so check the path), and empty lines in wildcard files producing blank prompt segments. Also, in fixed mode the auto-update stops - if you change the seed expecting new output, nothing happens until you flip back to populate. And file-based wildcards resolve relative to the pack's wildcards/ folder, so if you've moved your ComfyUI install, re-point or recreate the junction.

    CategoryπŸŒ’ Eclipse/ Text

    Inputs (6)

    NameTypeDefaultDescription
    wildcard_textSTRINGTry using __wildcard__ or {option1|option2}Enter a prompt using wildcard syntax.
    populated_textSTRINGThe actual value processed from 'wildcard_text'. In 'populate' mode, this is auto-updated. In 'fixed' mode, you can edit this value.
    modeCOMBOpopulatepopulate: Auto-processes wildcard_text based on seed. Change seed for new output, fix seed for consistent output. fixed: Uses populated_text as-is, you can edit it
    seedINT0-3–18446744073709550000Seed controls wildcard expansion in populate mode. Special values: -1=randomize each time, -2=increment from last, -3=decrement from last
    wildcardsoptCOMBO1 options: Select a Wildcard
    negative_promptoptSTRINGComma-separated tags to remove from the final output. Works like Raffle's negative_prompt - filters tags after wildcard expansion without affecting selection.

    Outputs (1)

    NameTypeDescription
    processed_textSTRINGβ€”