Nodes/ComfyUI-PromptDrafter/Wildcards - PromptDrafter
ComfyUI Node

Wildcards - PromptDrafter

Wildcards - PromptDrafter

By Carasibana·Created 8 months ago·Updated 6 months ago· 2
Wildcards - PromptDrafter
    • wildcard_value
    wildcard_values
    output_moderandom
    fixed_index0
    wildcard_name
    load_wildcard

    Prompt variety is the cheapest upgrade in image generation, and the way people usually get it is wildcard syntax: alternatives wrapped in braces, each queue hit picking a different combo. The Wildcards - PromptDrafter node is that idea, but it skips the part where you maintain a folder of .txt wildcard files. You type a list into the node, wire it to a PromptDrafter prompt field, and every run rolls the dice for you.

    Here's the shape of it. In a Dual or Single PromptDrafter node you write {wildcard_subject} in your prompt - note the wildcard_ prefix is mandatory, it's how the pack recognises placeholders. A matching input port called wildcard_subject appears. The Wildcard node's single output, wildcard_value, plugs into that port, and the list in wildcard_values is what gets swapped in. Write values separated by newlines, commas, or pipes - blonde hair | brunette hair | red hair - and wrap anything that itself contains a delimiter in (...) or {...} so it stays one entry, like (red, green).

    This is worth contrasting with the alternatives, because names collide. It is not Impact Pack's file-based __wildcard__ system, and it's not the old A1111 {a|b|c} bracket trick the KB tracks as a rediscovered way to batch character variations. PromptDrafter's wildcards are in-graph: no files, no extensions required, the list just lives in the node.

    The modes that matter

    • output_mode: random (default) - picks a random value. The node returns float("nan") from IS_CHANGED, so it genuinely re-rolls every run instead of being cached. This is the mode you'll live in.
    • sequential - cycles through the list in order. The index lives in memory, so it resets when ComfyUI restarts; there's a reset button wired through the backend API if you want to start over mid-session.
    • fixed - always emits the value at fixed_index. Handy for locking one option while you tune everything else.
    • dynamic_prompts - outputs the whole list as {opt1|opt2|opt3} for the Dynamic Prompts extension to process. Only reach for this if you actually run that extension.
    • list (csv) - the raw list joined by commas, when you want all options as one string.

    The save/load pair is wildcard_name + load_wildcard; saved lists go to saved/wildcards/ as JSON, and the pack ships examples like hair_colors, eye_colors, and lighting_styles so you can see the format immediately.

    Installing and the trap to avoid

    ComfyUI Manager (search "PromptDrafter"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Carasibana/ComfyUI-PromptDrafter
    

    Restart, done - no dependencies beyond ComfyUI, no downloads. The trap: a wildcard placeholder you never wired doesn't error, it silently becomes an empty string. So if your images keep coming out missing a concept, check that every {wildcard_...} in the prompt has a Wildcard node connected, and remember the port names have to match exactly. And if you're hunting for this in the add-node menu and can't find it, the pre-v1.3.3 name Wildcard was renamed to Wildcard_PromptDrafter - the old key still loads legacy workflows but is hidden from search.

    CategoryPromptDrafter

    Inputs (5)

    NameTypeDefaultDescription
    wildcard_valuesSTRING
    output_modeCOMBOrandom5 options: random, sequential, fixed, dynamic_prompts, list (csv)
    fixed_indexoptINT00–9999
    wildcard_nameoptSTRING
    load_wildcardoptCOMBO5 options: , art_styles, eye_colors, hair_colors, lighting_styles

    Outputs (1)

    NameTypeDescription
    wildcard_valueSTRING