Nodes/Orion4D_MetaNode/πŸ”½ Master Combo Box
ComfyUI Node

πŸ”½ Master Combo Box

Two dropdowns, zero rewiring β€” your parameter presets as plain JSON files

By orion4dΒ·Created 5 months agoΒ·Updated 5 months agoΒ· 5
πŸ”½ Master Combo Box
    • selected_text
    β—„categoryβ–Ύβ–Ί
    β—„valueβ–Ί

    The Master Combo Box is the pack's answer to a boring, universal problem: you have a set of named choices you keep picking from - aspect ratios, styles, strengths, model names - and you're tired of either retyping them or burying them in a script. This node gives you a two-level dropdown that reads its choices from JSON files on disk. Pick a category in the first menu, pick a value in the second, and the selection comes out as a clean string.

    The pack ships with a pile of example categories so you can see the pattern immediately: styles, ratios, megapixel, divisible_by, number_0-100, number_1-10, Ollama_model, Alpha-Color, color_grading, and more. Each one is a separate .json file in the pack's dropdowns/ folder, and each file is just an array of strings.

    How it works

    The node reads its options through a server route (/orion4d/get_dropdowns) that scans the dropdowns/ folder. Each .json file becomes a category; the file's contents become that category's options. On the Python side, category is a real combo widget populated at startup, value is a string widget driven by a custom dropdown in the UI, and a VALIDATE_INPUTS check makes sure the selected value actually exists in the selected category - so a stale selection errors out instead of silently passing garbage.

    There's also a Refresh button that reloads the JSON files without restarting ComfyUI. That's the workflow this node is built for: edit a JSON file, hit refresh, and your new options are live.

    Inputs and outputs

    • Inputs:
      • category (enum) - which JSON file to read.
      • value (STRING) - which entry within that category.
    • Output: selected_text (STRING) - the chosen value.

    That's the whole interface. No port math, no hidden modes.

    Adding your own choices

    Make a file in dropdowns/ - say moods.json:

    ["dark", "golden hour", "neon", "pastel"]
    

    Restart (or hit Refresh) and moods appears as a category with those four options. You can now wire selected_text into a prompt assembler, a resolution node, or anywhere a string parameter lives. The value validation means the dropdown always shows real, existing choices - which is the quiet killer feature for keeping shared workflows sane.

    Troubleshooting

    • "Value not found" errors after editing a JSON file: the node remembers its last selection, and if you removed that entry, validation rightly refuses it. Just pick a valid value from the refreshed dropdown.
    • Category list is empty on first load? The dropdowns/ folder gets created automatically if missing; drop a JSON array in and refresh.
    • This is a string node, not a magic parameter setter. It outputs selected_text; whatever consumes it still has to be able to parse that string. Keep your option values in the exact format the downstream node expects.

    Installing it

    It's part of Orion4D_MetaNode, so one install gets you all of this:

    cd ComfyUI/custom_nodes
    git clone https://github.com/orion4d/Orion4D_MetaNode
    

    Or use ComfyUI Manager (search "Orion4D_MetaNode") and restart. It appears under Orion4D_MetaNode β†’ UI Widgets. No extra dependencies, no models. Honest context: this is a young, single-developer pack with a modest footprint, so the Master Combo is a personal-utility sort of node - but the "dropdown driven by plain JSON files" pattern is genuinely handy and easy to extend.

    CategoryOrion4D_MetaNode/UI Widgets

    Inputs (2)

    NameTypeDefaultDescription
    categoryCOMBO11 options: Alpha-Color, Ollama_model, color_grading, divisible_by, megapixel, number_-40-40, +5
    valueSTRINGβ€”

    Outputs (1)

    NameTypeDescription
    selected_textSTRINGβ€”