Nodes/XENodes/Slider
ComfyUI Node

Slider

An actual slider for numbers, instead of typing into a box

By xeinherjer-dev·Created 6 months ago·Updated a day ago· 2
Slider
    value20.00

    ComfyUI's default number fields work, but iterating means clicking into a box, typing, clicking away, running, repeating. Slider gives you a real drag-handle control instead: a compact node with a slider and a number box on it, one output, and the kind of feel that makes fine-tuning a value actually pleasant. It's a utility in the ComfyUI-XENodes pack, and once you've used it to sweep denoise or cfg a few times you'll start wishing every numeric widget worked like this.

    The trick that makes it useful beyond "prettier number": the node is socketless - no input wires at all, the value lives in the node's own properties - and the output port is a custom dual-type. The backend casts the value for you: if it's a whole number it emits an int, if it's fractional it emits a float. Meanwhile the frontend watches what you connect the output to and re-types the port to match - hook it to an INT input and it presents as an INT, to a FLOAT input and it presents as a FLOAT. That adaptive behavior is the README's "dynamic type switching," and it means you don't get the classic INT/FLOAT mismatch error that stock primitives love to throw.

    The one input:

    • value (FLOAT, default 20, range roughly ±4.29 billion) - and it's a widget, not a socket. You set min, max, and step from the node's right-click properties menu, so you can clamp a slider to, say, 0–1 in 0.05 steps for denoise, or 0–100 in 1 for cfg. Step of 1 snaps to integers; a decimal step produces floats.

    The output:

    • A single INT,FLOAT port - wire it to any numeric input you'd otherwise fill by hand.

    The pattern that pays off: convert a KSampler's cfg or denoise widget to an input, drop a Slider in, and sweep the whole curve by dragging. Pair it with a Multi-Switch's select and you're flipping between branches without touching the graph. It's the same niche as the typed primitive nodes, but with a drag handle instead of a text box.

    Install is the pack-standard one-liner:

    cd ComfyUI/custom_nodes
    git clone https://github.com/xeinherjer-dev/ComfyUI-XENodes.git xenodes
    

    or search "ComfyUI-XENodes" in ComfyUI Manager, then restart. No models, no pip dependencies for this node.

    Small honest caveats. The min/max/step live in the properties panel, not as widgets, which surprises people the first time - right-click the node to find them. And while the output adapts to your target's type, it can't be two types at once; it adopts the type of the first thing you connect, so if you re-wire it to the other type, reconnect the wire to re-type the port. Both are "know it once" quirks rather than actual problems. And the usual pack note: if nothing from XENodes appears after install, read the ComfyUI console - the whole pack imports as one module, so a sibling node's missing dependency (SaveAudio imports PyAV's av) can hide every node in the menu.

    Categoryxenodes/utils

    Inputs (1)

    NameTypeDefaultDescription
    valueFLOAT20.00-4294967296–4294967296

    Outputs (1)

    NameTypeDescription
    INT,FLOAT