Nodes/ComfyUI_StarNodes/⭐ Star Wildcards Advanced
ComfyUI Node

⭐ Star Wildcards Advanced

Seven prompt slots, seeded wildcards, and the old {a|b|c} trick — batch variety without writing prompts

By Starnodes2024·Created 2 years ago·Updated 2 days ago· 106
⭐ Star Wildcards Advanced
    • STRING
    seed0
    prompt_1
    wildcard_1
    prompt_2
    wildcard_2
    prompt_3
    wildcard_3
    prompt_4
    wildcard_4
    prompt_5
    wildcard_5
    prompt_6
    wildcard_6
    prompt_7
    wildcard_7

    Wildcards are the cheapest way to get variety out of a batch: instead of writing fifty prompts, you write one template with random slots, and each run pulls a different combination. ⭐ Star Wildcards Advanced is StarNodes' take on that idea, and it's one of the better ones because it does two things the basic wildcard nodes often don't: it's seeded, so a given seed reproduces the exact same picks, and it gives you seven independent prompt slots, each with its own wildcard file attached.

    Here's the pattern people actually use it for: run a character-reference batch and get the same subject across different cameras, lighting, and moods - no training involved. It's the same old A1111 wildcard syntax that most people arriving after 2024 never learned, wrapped in a node that's easier to wire than a raw syntax string.

    How it works

    Your wildcard files live in [ComfyUI]/wildcards/ as .txt files, one option per line. In your prompt text you write:

    a photo of __animal__ in __place__, {golden hour|blue hour|midnight}, __style__
    
    • __name__ picks a random line from wildcards/name.txt.
    • subfolder\__name__ reaches into subfolders.
    • {a|b|c} picks one of the options at random.
    • Nesting works - a picked line can itself contain wildcards, up to 10 levels deep.

    The node has seven prompt_1prompt_7 multiline text boxes, each with a matching wildcard_1wildcard_7 dropdown: None (leave that slot as-is), Random (grab a random wildcard file), or a specific file. Everything gets concatenated with spaces into one STRING output, which you wire straight into a CLIP Text Encode node.

    The seed is the star

    Because every slot is derived from the single seed input (slot two gets seed+144, slot three seed+245, and so on), the whole thing is reproducible: same seed, same prompt picks, every time. That's the difference between a wildcard node you can actually iterate on and one where every rerun is a dice roll. For a batch of variations, run the same workflow across seeds - you get the randomness, but you can go back and find exactly which seed produced the result you liked.

    Installing it

    ComfyUI Manager, search Starnodes, install, restart. Manual:

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

    It's under ⭐StarNodes/Text And Data. Bonus: on first start, the pack copies its own ready-made wildcard collection (about 48 files - animals, art styles, camera angles, outfits, and so on) into [ComfyUI]/wildcards/. It only fills in files that don't exist, so it won't clobber anything you already have. That's a genuinely nice touch for a beginner who has zero wildcard files.

    Gotchas

    • Wildcards only resolve if the file exists in [ComfyUI]/wildcards/. If __something__ stays literally in your output, that file isn't there - or you've exceeded the 10-level nesting depth.
    • The dropdown only lists top-level wildcard files, but the subfolder\__name__ syntax works regardless. Don't assume the dropdown is the only way in.
    • Each slot appends the wildcard text after your typed prompt with a space. Put the fixed part of your sentence in the prompt box, not in the wildcard file.
    • The output is a single plain string - any node that takes a prompt accepts it.

    The honest limitation: this is file-based variety, not intelligence. If you want the LLM to rewrite your prompt wholesale, that's a different node entirely. But for "give me a hundred variations of a portrait with different hair and lighting," this is exactly the tool.

    Category⭐StarNodes/Text And Data

    Inputs (15)

    NameTypeDefaultDescription
    seedINT00–18446744073709550000
    prompt_1STRING
    wildcard_1COMBO50 options: None, Random, animal, animals, artist-horror, artstyle, +44
    prompt_2STRING
    wildcard_2COMBO50 options: None, Random, animal, animals, artist-horror, artstyle, +44
    prompt_3STRING
    wildcard_3COMBO50 options: None, Random, animal, animals, artist-horror, artstyle, +44
    prompt_4STRING
    wildcard_4COMBO50 options: None, Random, animal, animals, artist-horror, artstyle, +44
    prompt_5STRING
    wildcard_5COMBO50 options: None, Random, animal, animals, artist-horror, artstyle, +44
    prompt_6STRING
    wildcard_6COMBO50 options: None, Random, animal, animals, artist-horror, artstyle, +44
    prompt_7STRING
    wildcard_7COMBO50 options: None, Random, animal, animals, artist-horror, artstyle, +44

    Outputs (1)

    NameTypeDescription
    STRINGSTRING