Nodes/ComfyUI Deploy/External Enum
ComfyUI Node

External Enum

The dropdown your API callers actually want — a real menu, not a free-text box

By BennyKok·Created 3 years ago·Updated 10 months ago· 1,529
External Enum
    • text
    â—„input_idinput_enumâ–º
    â—„default_valueâ–º
    â—„optionsâ–º
    â—„display_nameâ–º
    â—„descriptionâ–º

    If you've deployed a workflow, you know the moment: you want the caller to pick a style or a setting from a fixed list, and a free-text field is an invitation to typos and garbage. "External Enum" is Comfy Deploy's answer - an input that surfaces as a dropdown with a fixed set of options, and returns the chosen value as text. Where External Number gives you a number field and External Boolean gives you a toggle, this gives you a menu.

    It's the input for decisions with a bounded answer set: sampling presets, aspect ratios, style names, "portrait / landscape / square", output resolutions, LoRA-strength tiers. The caller can't invent a new option - they pick from what you defined - which makes your deployed workflow dramatically more predictable to support. That's the whole value proposition, and for API products it's worth a lot.

    How it works

    Two fields do the work: options is the list you define (as a text block), and default_value is what comes out when the caller doesn't pick. The node itself just returns default_value - same pass-through pattern as the Boolean input. The dashboard reads your options and renders a proper dropdown in the request UI, and the backend overrides the node's value with the caller's pick. The editor-side dropdown you see is the pack's dynamic-enum plumbing making default_value behave like a selectable list.

    Inputs and output

    • input_id - default input_enum. The key callers use to address this menu.
    • options - the list of choices, one per line (multiline). Keep it machine-friendly; this is what populates the dropdown.
    • default_value - what's returned when nothing is selected.
    • Optional: display_name, description - label the menu for your dashboard UI.

    Output: text, in the wildcard * type so it can wire into anything that accepts a string.

    Installing it

    Same pack install as the rest of ComfyUI Deploy:

    cd ComfyUI/custom_nodes
    git clone https://github.com/BennyKok/comfyui-deploy.git
    

    Restart ComfyUI, or install "ComfyUI Deploy" via ComfyUI Manager. No models, no key, no heavy deps.

    Where people get burned

    The wildcard output is both feature and trap. ComfyUI happily lets you wire a * into anything, which is convenient - but if the downstream node really wants a typed STRING (like a CLIP text encoder), the wildcard can pass through fine while a strict node rejects it. Wire it and test early rather than discovering the type friction mid-run.

    Second gotcha: options is freeform text with no validation. A stray trailing space, a duplicated line, or an empty option shows up in your dropdown as junk your callers will faithfully select. Curate the list; garbage in the menu is garbage in the API response. And remember the editor and the dashboard are two different places - if you edit options in the graph but don't re-upload the workflow to ComfyDeploy, the API callers still see the old menu.

    Category🔗ComfyDeploy

    Inputs (5)

    NameTypeDefaultDescription
    input_idSTRINGinput_enum—
    default_valueoptSTRING—
    optionsoptSTRING—
    display_nameoptSTRING—
    descriptionoptSTRING—

    Outputs (1)

    NameTypeDescription
    text*—