ComfyUI Node

Dynamic Slider

A float slider that actually stops at 1.0 — Dynamic Slider, explained

By DemonAlone·Created 3 months ago·Updated a day ago· 2
Dynamic Slider
    • value
    ◄typeFLOAT►
    ◄value_int1►
    ◄min_int0►
    ◄max_int100►
    ◄step_int1►
    ◄value_float0.50►
    ◄min_float0.00►
    ◄max_float1.00►
    ◄step_float0.01►

    Denoise is a 0-to-1 number. CFG is roughly 1-to-30. And the core Primitive Float node hands you a slider that runs to 1000 with 0.001 precision, so you end up typing into the box and pretending the slider isn't there. Dynamic Slider fixes exactly that: you define min, max and step yourself, per instance, and the slider behaves like it was built for the field you're feeding.

    What it is

    One node from DemonAlone's JS Addon pack, a small utility collection whose interesting parts are JavaScript frontend extensions rather than heavy Python. The README is upfront about the lineage: DA_DynamicSlider is based on Power Primitive from rgthree-comfy, and the pack's older Preset Float / Preset Int nodes are deprecated in its favour ("will be deleted in the future version") - so if a tutorial pointed you at Preset Float, this is the replacement.

    The gap it fills: a typed primitive is rigid - PrimitiveFloat bakes its bounds in at registration, so every float in your graph shares one unusable range. This gives each instance its own, saved with the workflow.

    How it works

    Two complete parameter sets live on the node at once - an INT set and a FLOAT set - plus a type dropdown that picks which is live. Nine widgets, always submitted together.

    The JavaScript side (web/DynamicSlider.js) does the theatre. On node creation it grabs all the widgets, then on every change of type, min_*, max_* or step_* it hides the inactive group and rewrites the visible slider's options.min / options.max / options.step (plus step2, which makes mouse-wheel scrolling respect your step), sets precision from the step string, then clamps and snaps. Native-feeling bounded slider, no reload.

    Python does the real guard rails in execute(): clamp, snap to step, round floats so you never see 0.30000000000000004, and coerce nonsense away - if min >= max it makes max min + step, a step_int below 1 becomes 1, a step_float of 0 or less becomes 0.01. So even with a stale frontend and all nine widgets showing, the number that reaches your sampler is still clamped and snapped. The UI is cosmetic; the maths is server-side.

    What you actually set

    type is the switch: INT or FLOAT, default FLOAT. It's a widget, not a socket, so you can't wire it.

    Then the four for that mode. For FLOAT: value_float (default 0.5), min_float (0), max_float (1.0) and step_float (0.01) - already a perfect denoise slider out of the box. For INT: value_int (default 1), min_int (0, mismatched with the default), max_int (100) and step_int (1, and 1 is the floor - sub-integer stepping is what FLOAT mode is for).

    Set the range before you set the value. The extension clamps on every min/max/step change: type 1.2 into a 0-to-1 slider, then widen max to 2, and your 1.2 was already squashed to 1.0.

    There's one output, value, declared as type * - ComfyUI's wildcard, the same escape hatch rgthree's Any Switch uses. The socket takes a link into any numeric input, which is why one node covers denoise, CFG, steps, seed and video FPS without four copies. Right-click the target widget → Convert widget to input, wire this in. It emits an int or float depending on type, so point it at numbers.

    Find it by double-clicking the canvas and searching "Dynamic Slider"; its menu category is the literal string CustomNodes/Utils, not where you'd dig by hand.

    Install

    Manager: search DemonAlone-JS_Addon-ComfyUI. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/DemonAlone/DemonAlone-JS_Addon-ComfyUI
    

    Restart, then hard-refresh the tab (Ctrl+Shift+R). No models, no requirements.txt - good, and a trap. __init__.py eagerly imports every module the pack ships, including three video nodes that import av at the top. PyAV normally arrives with ComfyUI, but if it's broken, the whole pack fails to register and Dynamic Slider vanishes with the video loaders. Node missing? Read the terminal for an import error before blaming your clone.

    Common issues

    All nine widgets showing, nothing hidden. The extension isn't running. Check the console for [DA_DynamicSlider] Extension loaded; if it's absent, Ctrl+Shift+R first (pack JS gets cached hard across updates), then check the startup log.

    Your value keeps snapping back down. Min/max changed after the value and the clamp ran. Range first.

    It doesn't work inside a subgraph. The author's own warning, in capitals, in the node description - believe it. The extension hooks nodeCreated/onConfigure on the canvas node and hides widgets; once it's nested, the subgraph wrapper owns the promoted widget UI and that surgery doesn't take. Keep it top-level.

    Know what you're buying. This is an obscure single-developer pack - three mentions in two years of the reddit corpus I checked - and it does surgery on frontend widgets, exactly the category that broke when the Nodes 2.0 rewrite scrambled packs like rgthree's. Weird behaviour after a ComfyUI update? Suspect the frontend first. If you only need one bounded float and can tolerate the wide slider, core PrimitiveFloat still works with zero risk.

    CategoryCustomNodes/Utils

    Inputs (9)

    NameTypeDefaultDescription
    typeCOMBOFLOAT2 options: INT, FLOAT
    value_intINT1-1000000000–1000000000—
    min_intINT0-1000000000–1000000000—
    max_intINT100-1000000000–1000000000—
    step_intINT1—
    value_floatFLOAT0.50-1000000000–1000000000—
    min_floatFLOAT0.00-1000000000–1000000000—
    max_floatFLOAT1.00-1000000000–1000000000—
    step_floatFLOAT0.010–1000000000—

    Outputs (1)

    NameTypeDescription
    value*—