Nodes/ComfyUI_StarNodes/⭐ Star 1 Wildcard
ComfyUI Node

⭐ Star 1 Wildcard

What ⭐ Star 1 Wildcard actually does

By Starnodes2024·Created 2 years ago·Updated a day ago· 107
⭐ Star 1 Wildcard
    • STRING
    ◄seed0►
    ◄prompt—►
    ◄wildcard▾►

    Every prompt has a fixed part and a part you want to wiggle. ⭐ Star 1 Wildcard is the smallest possible answer to the second one: a text box, a dropdown of .txt files, a seed, and a single STRING coming out the other side.

    It's the one-slot version of the pack's own ⭐ Star Wildcards Advanced, which does the same trick seven times in one node. If you want "same prompt, but the animal - or the outfit, or the camera angle - changes between queued runs", this is the node, and it beats hand-editing the prompt box twenty times.

    Why it still matters in 2026

    Wildcard syntax is old A1111-era stuff - the {brown|blonde|black} bet, the __animal__ reference - and most people who arrived after 2024 never learned it. There's a reason it survived the architecture change: prompt weighting (face:1.4) gets passed through as literal punctuation on LLM-encoded models, but wildcards aren't weighting at all. They're text substitution that happens before the encoder sees the string, so the model can't tell the difference.

    How it works

    The mechanism is short, and none of it is magic:

    1. Your prompt goes through the pack's inline syntax processor. {a|b|c} picks one option, __animal__ pulls a random line from wildcards/animal.txt, folder\__name__ reaches into a subfolder, and nesting works - the pack caps recursion at 10 levels.
    2. If wildcard isn't None, it picks one line from that file and appends it to the processed prompt, separated by a space.
    3. seed drives both picks. The file pick is offset to seed + 5, so even Random is reproducible.

    That's the whole node in a sentence: the seed is your randomizer. Leave it fixed and you get an identical prompt every run; change it and the same graph hands you a different animal, place or styling line.

    The dropdown itself is built by scanning ComfyUI/wildcards for .txt files on load, sorted alphabetically, with None and Random bolted onto the front. A fresh install lists 50 entries - the pack's own 48 files plus those two.

    The inputs that matter

    Three, and you'll touch all of them:

    • seed - the re-roll. Named seed, which means ComfyUI gives it the same run-to-run control dropdown as a KSampler seed (fixed / increment / randomize).
    • prompt - free text, multiline. This is where __wildcard__ and {a|b|c} go. You don't have to use the dropdown at all; the inline syntax works on its own.
    • wildcard - None (append nothing), Random (pick a random file, then a random line), or one named file. One line per file, one file per run.

    The output is a single STRING. Wire it into the text input of a text-encode node, or into ⭐ Star Text Inputs (Concatenate) if you're gluing it together with other text. There's no conditioning output - it's a string and only a string.

    Install

    Same as the rest of the pack. In ComfyUI Manager, search Starnodes and install, then restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Starnodes2024/ComfyUI_StarNodes
    cd ComfyUI_StarNodes
    pip install -r requirements.txt
    

    Find it under the ⭐StarNodes category, or double-click the canvas and search wildcard.

    On first start the pack copies its wildcard collection into ComfyUI/wildcards/. Add your own there - one option per line, plain text, .txt extension. This node needs nothing beyond ComfyUI core, but the pack's requirements.txt still pulls in opencv-python, scikit-learn, psd-tools, color-matcher, imageio-ffmpeg and the ollama client for its other nodes. Its install.py runs no pip installs of its own, and a missing optional package only costs you the one node that needs it.

    Where people get burned

    A new .txt doesn't show up. The list is built when the node definition loads, so a new file usually needs a ComfyUI restart (or a refresh of node definitions) before it appears.

    A missing or misspelled wildcard fails silently. If the file isn't there, the node returns the wildcard's name as text instead of erroring. So __animls__ puts the word animls in your prompt, and you find out from the image rather than a red border.

    Deleting a default wildcard doesn't stick. On startup the pack re-copies any of its files missing from ComfyUI/wildcards/. Move them out instead of deleting.

    The seed trap, same as everywhere. If the control dropdown is on randomize, the number in the box is the one used next, not the one that just made the image you liked. Fix it once per install: "widget control mode" → Before.

    If you want more slots or a prompt-matrix layout, jump to ⭐ Star Wildcards Advanced - same syntax, seven slots, each with its own seed offset.

    Category⭐StarNodes/Text And Data

    Inputs (3)

    NameTypeDefaultDescription
    seedINT00–18446744073709550000—
    promptSTRING—
    wildcardCOMBO50 options: None, Random, animal, animals, artist-horror, artstyle, +44

    Outputs (1)

    NameTypeDescription
    STRINGSTRING—