ComfyUI Node

makiwildcards

Random prompt lines from a file, on a seed — no __wildcard__ syntax needed

By MakkiShizu·Created 2 years ago·Updated about a year ago· 26
makiwildcards
    • text
    • file contents
    wildcards_count3
    delimiter,
    clean_whitespacetrue
    replace_underscoretrue
    randomstrue
    seed0
    wildcard_name_1None
    wildcard_name_2None
    wildcard_name_3None
    wildcard_name_4None
    wildcard_name_5None
    wildcard_name_6None
    wildcard_name_7None
    wildcard_name_8None
    wildcard_name_9None
    wildcard_name_10None
    wildcard_name_11None
    wildcard_name_12None
    wildcard_name_13None
    wildcard_name_14None
    wildcard_name_15None
    wildcard_name_16None
    wildcard_name_17None
    wildcard_name_18None
    wildcard_name_19None
    wildcard_name_20None
    wildcard_name_21None
    wildcard_name_22None
    wildcard_name_23None
    wildcard_name_24None
    wildcard_name_25None
    wildcard_name_26None
    wildcard_name_27None
    wildcard_name_28None
    wildcard_name_29None
    wildcard_name_30None
    wildcard_name_31None
    wildcard_name_32None
    wildcard_name_33None
    wildcard_name_34None
    wildcard_name_35None
    wildcard_name_36None
    wildcard_name_37None
    wildcard_name_38None
    wildcard_name_39None
    wildcard_name_40None
    wildcard_name_41None
    wildcard_name_42None
    wildcard_name_43None
    wildcard_name_44None
    wildcard_name_45None
    wildcard_name_46None
    wildcard_name_47None
    wildcard_name_48None
    wildcard_name_49None
    text

    If you came from A1111, you already know wildcards: a placeholder in your prompt swaps in a random line from a text file on every run. ComfyUI never shipped that, so people keep rebuilding it. makiwildcards is the rebuild that skips the part people usually hate - the __name__ placeholder syntax buried inside a prompt string. There's no placeholder parsing at all. You pick the wildcard files from dropdowns, tell the node how many to use, and it hands you a finished string ready to wire into a CLIP Text Encode.

    The thing that makes it worth reaching for is variety at batch scale. Set wildcards_count to 3, pick a hair file, a clothes file and a pose file, queue 32 images, and every one gets a different combination - same character, different look, zero prompt editing between runs. It's the same trick people use to build character reference libraries (the old A1111 wildcard syntax the KB's prompt-engineering notes most post-2024 arrivals never learned), just without the learning curve.

    How it works

    At startup the node scans two folders and turns every .txt, .yaml and .yml file into a dropdown entry: your own ComfyUI/wildcards folder (entries show as base_path | ...) and the plugin's own wildcards/ folder (custom_nodes | ...). YAML files get extra entries for each nested key, so you can navigate a structured file like a tree.

    The seed logic is the part people actually care about. randoms = true (the default) picks a random line per file, seeded with seed + slot_index. Same seed, same picks - that's determinism you can build a batch around. Bump the seed and everything rerolls. randoms = false switches to pure row selection: line (seed - 1) % lines, so seed 1 is the first line. A March 2025 change made each slot use seed + index, so two slots pointing at the same file with one seed no longer collide - but it also means old workflows won't reproduce their old output after updating. Worth knowing before you blame the node.

    A tip that saves people a lot of confusion: this seed is just an int input. It doesn't have to match your sampler's seed. Keep them separate and you can reroll the wildcard picks while keeping the same noise, which is how you'd iterate on a composition without changing the scene.

    Inputs and outputs

    The inputs that actually matter:

    • wildcards_count - how many of the dropdown slots get used (1–50, default 3). The rest hide.
    • wildcard_name_1…N - pick a wildcard file for each slot. None skips the slot.
    • seed and randoms - the deterministic/random behavior above.
    • delimiter - how the picked lines get joined (default ", ", and entering \n gives newline separation).
    • clean_whitespace and replace_underscore - strip stray spaces and turn _ into spaces, which matters for danbooru-style tag files.
    • text - optional text prepended before the wildcard picks.

    Outputs are text (the joined result - this is what you wire into a positive or negative prompt encode) and file contents (a raw dump of the selected files, handy for debugging what you actually pulled).

    Installation

    ComfyUI Manager: search "ComfyUI-Prompt-Wildcards" and install. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MakkiShizu/ComfyUI-Prompt-Wildcards.git
    

    Restart ComfyUI. There are no Python dependencies to install and no model downloads - the pack rides on the yaml and folder_paths that ComfyUI already ships. It even comes with 570+ wildcard files (folders for NAIV3, SDXL, AnimagineXLV3, DanbooruTAG and more), so you can start generating variety before you've written a single file of your own.

    Common issues

    • New file doesn't show in the dropdown. The file list is built when the node loads. Restart ComfyUI after adding files - it won't pick them up live.
    • My file isn't listed at all. It has to live in ComfyUI/wildcards (shows as base_path |) or the plugin's wildcards/ folder (custom_nodes |). A file dumped in the ComfyUI root is invisible.
    • Deterministic mode picks the last line. With randoms = false and seed 0, (0 - 1) % lines wraps to the final row. Seed 1 is the first line; that off-by-one surprises everyone once.
    • Nothing changes between runs. Same seed = same picks by design. Change the seed (not the whole prompt) to reroll.
    Categoryutils/Prompt-Wildcards

    Inputs (56)

    NameTypeDefaultDescription
    wildcards_countINT31–50
    delimiterSTRING,
    clean_whitespaceBOOLEANtrue
    replace_underscoreBOOLEANtrue
    randomsBOOLEANtrue
    seedINT00–18446744073709550000
    wildcard_name_1COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_2COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_3COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_4COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_5COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_6COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_7COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_8COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_9COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_10COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_11COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_12COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_13COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_14COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_15COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_16COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_17COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_18COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_19COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_20COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_21COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_22COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_23COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_24COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_25COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_26COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_27COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_28COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_29COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_30COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_31COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_32COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_33COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_34COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_35COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_36COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_37COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_38COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_39COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_40COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_41COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_42COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_43COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_44COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_45COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_46COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_47COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_48COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    wildcard_name_49COMBONone577 options: None, custom_nodes | 人物-装饰-下身, custom_nodes | 人物-类型, custom_nodes | 人物-鞋袜, custom_nodes | 人物-唇膏, custom_nodes | 自然景观-花卉, +571
    textoptSTRING

    Outputs (2)

    NameTypeDescription
    textSTRING
    file contentsSTRING