Nodes/ComfyUI-RE-CustomUtils/Prompt Option Picker
ComfyUI Node

Prompt Option Picker

A dropdown for prompt fragments — with a cartesian combos feature that punches way above its weight

By relhamdi·Created 7 months ago·Updated 2 months ago· 1
Prompt Option Picker
    • value
    options
    selected

    PromptOptionPicker is the workhorse of the prompt-assembly half of this pack. You give it a list of prompt fragments, it gives you a dropdown, and the selected fragment comes out as a string you can inject anywhere. On paper that's the same job as QuickCombo. In practice it's the grown-up version, and it has one feature - @combine blocks - that turns it from a list picker into a little prompt-generation engine.

    How it works

    The options field is multiline, one option per line:

    sitting down
    standing up
    lying down
    
    kneeling
    

    The dropdown rebuilds as you type. The empty line there becomes a -- entry that outputs an empty string - which is genuinely useful when you want to leave a slot blank rather than force a value. If the field is empty, the dropdown resets to --.

    You can also label options without changing what gets sent downstream, using label $: value:

    happy $: character, smile, laughing
    sad $: character, crying
    

    "happy" shows in the dropdown; "character, smile, laughing" is what actually reaches the prompt. Unlabeled entries auto-name as option_N with $: value.

    The @combine block

    This is the part nobody expects from a dropdown node. Wrap several lists in @combine / @end, separated by ---, and it expands into the cartesian product - every combination of one item from each list, joined by , :

    @combine
    from front
    from side
    ---
    from above
    from below
    ---
    close-up
    @end
    

    That generates all 8 combinations ("from front, from above, close-up", "from front, from above, full body", …), each as a dropdown option. For batch variety this is a tiny version of the wildcard trick without any wildcard syntax - you get exhaustive combinations you can sweep through or batch over. Multiple @combine blocks work independently, and a --- outside a block is treated as a literal option.

    Inputs and outputs

    Two inputs, one output: options (the list), selected (the dropdown), and value (the string that comes out). It validates as you edit - an unclosed @combine, a nested block, or an orphan @end stops the workflow with a clear message. The editor highlights @combine/---/@end in orange and labels in cyan, so you can see the structure before you run.

    Installing it

    It ships in ComfyUI-RE-CustomUtils - search that in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/relhamdi/ComfyUI-RE-CustomUtils
    

    Restart ComfyUI. No extra packages, no model downloads; the pack's only declared dependency is torch.

    Where it fits

    The natural pattern in this pack is OptionPicker feeding slots: connect it to a PromptLayoutFiller slot, or wire several into a PromptRouter and switch between them. Each picker manages its own list independently, so you can have one for poses, one for lighting, one for camera angle and swap any of them without touching the others.

    One honest note: if you only need a 4-item inline list, QuickCombo is faster and you shouldn't bother with this. But the moment you want labels, blank options, or actual generated combinations, PromptOptionPicker is the one to reach for - and the @combine feature alone justifies keeping it around.

    CategoryRE-CustomUtils

    Inputs (2)

    NameTypeDefaultDescription
    optionsSTRINGOne option per line. Empty line = empty value (--). Use @combine / --- / @end blocks for cartesian products.
    selectedCOMBOSelect an option.

    Outputs (1)

    NameTypeDescription
    valueSTRING