Nodes/ComfyUI-lhyNodes/Dynamic Parameter Panel
ComfyUI Node

Dynamic Parameter Panel

One JSON config spawns a whole control panel of native widgets

By lihaoyun6·Created 12 months ago·Updated 13 days ago· 20
Dynamic Parameter Panel
    • params_bundle
    config_json{ "Prompt": { "type": "STRING", "multiline": true, "placeholder": "write your prompts here" }, "Steps": { "type": "INT", "default": 30, "min": 10 }, "cfg_scale": { "type": "FLOAT", "name": "CFG Scale", "default": 7.0, "min": 1.0, "max": 20.0, "step": 0.05, "precision": 2, "display": "slider" }, "Model": { "type": "COMBO", "values": ["SD1.5","SDXL"], "default": "SDXL" }, "Lora": { "type": "COMBO", "folder": "loras" }, "hires_fix": { "type": "BOOLEAN", "name": "Hires Fix", "default": false, "tooltip": "Whether to run 2-pass sampling." } }
    is_lockedfalse
    live_previewfalse

    Every big ComfyUI workflow eventually looks like a bowl of spaghetti, and the fix everyone reaches for is a control panel: one node holding all the knobs - prompt, steps, CFG, model, LoRA - so you're not hunting across the canvas to change a seed. DynamicParameterPanel does this with a twist: the panel's widgets are generated from a JSON config you write. Change the JSON, the panel re-arranges itself. It's the most "Power Prompt"-adjacent node in the lhyNodes pack, and it's a genuinely clever piece of work - a custom web extension renders native ComfyUI widgets on the node itself.

    How it works

    The node runs two halves. On the frontend, a custom JS extension reads your config_json and builds real ComfyUI widgets - text boxes, sliders, dropdowns, toggles - right on the node body. It supports STRING, INT, FLOAT, BOOLEAN, and COMBO (which can be a fixed values list or a folder like "loras" that pulls file names from ComfyUI's model folders via a small API endpoint). A name key renames the widget, min/max/step/precision control range, display: "slider" makes a float a slider. On the backend, execute() reads the submitted widget values, coerces them to the declared types, and bundles them into a single DYNAMIC_PARAMS output.

    That bundle is meant for the pack's companion node, ParameterUnpacker, which splits it back out into up to 32 wildcard wires - wire those into your samplers, loaders, and text encoders and the panel becomes the single control surface for the whole graph. is_locked freezes the generated widgets so you don't accidentally re-edit a config you're happy with; live_preview toggles preview behavior.

    Inputs and outputs

    • config_json (STRING, multiline) - the schema. The default is a complete working example: Prompt (multiline STRING), Steps (INT), cfg_scale (FLOAT slider), Model (COMBO), Lora (COMBO from the loras folder), hires_fix (BOOLEAN). Start from it.
    • is_locked (BOOLEAN, default false) - freeze the generated widgets.
    • live_preview (BOOLEAN, default false).

    One output: params_bundle (DYNAMIC_PARAMS) → feed it to ParameterUnpacker.

    Installing it

    Part of ComfyUI-lhyNodes:

    • ComfyUI Manager → search lhyNodes → Install, restart.
    • Or manually:
    cd ComfyUI/custom_nodes
    git clone https://github.com/lihaoyun6/ComfyUI-lhyNodes.git
    python -m pip install -r ComfyUI-lhyNodes/requirements.txt
    

    Restart ComfyUI - the web extension needs a fresh page load to register.

    Where people get burned

    The config cap is 32 parameters, enforced on both ends; going past it silently drops entries, so count your keys. And the JSON is strict - a trailing comma or a missing quote kills the whole panel's widget generation, and the failure mode is "panel looks empty," which reads like the pack broke rather than your syntax. Keep a copy of your config in a text node or file. One more: COMBO with folder only lists models that ComfyUI has already scanned, so a newly dropped LoRA may need a restart to appear. Worth those quirks - this is the rare node that makes a 60-node workflow feel operable again.

    CategorylhyNodes/UI

    Inputs (3)

    NameTypeDefaultDescription
    config_jsonSTRING{ "Prompt": { "type": "STRING", "multiline": true, "placeholder": "write your prompts here" }, "Steps": { "type": "INT", "default": 30, "min": 10 }, "cfg_scale": { "type": "FLOAT", "name": "CFG Scale", "default": 7.0, "min": 1.0, "max": 20.0, "step": 0.05, "precision": 2, "display": "slider" }, "Model": { "type": "COMBO", "values": ["SD1.5","SDXL"], "default": "SDXL" }, "Lora": { "type": "COMBO", "folder": "loras" }, "hires_fix": { "type": "BOOLEAN", "name": "Hires Fix", "default": false, "tooltip": "Whether to run 2-pass sampling." } }
    is_lockedBOOLEANfalse
    live_previewBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    params_bundleDYNAMIC_PARAMS