Nodes/PromptFlow/PromptFlow Variations
ComfyUI Node

PromptFlow Variations

See every wildcard combination before you waste the queue

By maartenharms·Created 7 months ago·Updated 7 months ago· 19
PromptFlow Variations
    • prompt
    • variation_count
    • variations_json
    prompt
    seed0

    Here's the pain this node kills: you write a prompt with three wildcards and queue a batch, and only afterward do you find out which of the 24 combinations actually worked. You burned the compute, sat through the queue, and half the outputs were duds. PromptFlow Variations (class PromptFlowVariations) is the "look before you leap" node for wildcard prompts - it shows you every combination up front, lets you pick the ones worth generating, and hands you the list ready to batch.

    It's the companion piece to PromptFlow's main node, but it stands alone fine: feed it any prompt containing {a|b|c} wildcards and it does the boring cartesian math for you.

    How it works

    Give it a prompt with wildcards and it parses out each {option1|option2|option3} group, computes the full product of combinations, and shows them in a scrollable list inside the node - think "24 variations from 3 wildcards" rather than an opaque batch. Each variation comes with a seed hint, so any single combination is reproducible. You click rows to select (shift+click for a range), hit Queue Selected, and ComfyUI only generates the ones you actually want. That's the whole trick: instead of blind-batching the entire space, you spend your GPU on the subset that matters - like building a character library by batching 32 runs but only committing to the angles that look right.

    Inputs and outputs

    The node is small on purpose. Inputs:

    • prompt (required) - the prompt with wildcards to analyze. Paste one directly, or wire one in; the README's canonical setup routes PromptFlow's prompt_data output here, so the two nodes form a pipeline: build in PromptFlow, prune in Variations.
    • seed - starting seed for batch generation. Leave at 0 and let the node's per-variation hints do the work, or set it to pin a specific starting point.

    Outputs:

    • prompt - the currently selected variation, with wildcards already expanded. Wire this to CLIP Text Encode.
    • variation_count - an INT with the total number of combinations. Handy if you want to drive a batch-size or step calculation downstream.
    • variations_json - the whole list serialized as a string, if you want to save or share the search space.

    Install and gotchas

    It ships in the same pack, so install once and you get both nodes: ComfyUI Manager → search "PromptFlow" → install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/maartenharms/comfyui-promptflow
    

    No models, no extra dependencies - it's string math plus a list UI. The one launch-day snag was people not finding the pack in Manager right after release; update ComfyUI and Manager, refresh the registry, and search again - it's listed now.

    Reality check before you fall in love: the list only earns its keep when your prompt actually branches. One wildcard with no alternatives gives you variation_count of 1 and nothing to prune. It also shines brightest as a pre-flight tool - some people run it just to sanity-check the count before a big batch, then discard the node. That's fine too; the count alone tells you whether you overreached on wildcard sprawl.

    CategoryPromptFlow

    Inputs (2)

    NameTypeDefaultDescription
    promptSTRINGPrompt with wildcards to analyze
    seedoptINT00–18446744073709550000Starting seed for batch generation

    Outputs (3)

    NameTypeDescription
    promptSTRING
    variation_countINT
    variations_jsonSTRING