π Int Slider
A drag-to-set integer input for ComfyUI
- int
It's a slider that spits out an integer. That's genuinely all it is, and that's fine - sometimes you just want to grab a value and drag it instead of clicking into a number box and typing. Wire the output into any INT input - steps, a batch count, a width or height, a seed offset, whatever - and now you've got a physical dial for it on the canvas.
Where this earns its place is prototyping and live tweaking. When you're dialing in a workflow and want to sweep a value while watching the result, a slider you can nudge with the mouse beats typing 24, running, typing 28, running. It's a small quality-of-life thing, not a capability you didn't have - core ComfyUI already lets you type integers everywhere. But the SDVN pack is full of these little ergonomic widgets, and if you build a lot of graphs they add up.
How it works
The node exposes a slider bound to an integer range and outputs whatever it's currently set to as a plain INT. Downstream, that value behaves exactly like any hand-typed integer - ComfyUI doesn't know or care that it came from a slider.
The neat trick is the settings field, which lets you redefine the slider's range without touching the node's code. By default the slider runs 0β100 in steps of 1, which is fine for a lot of things and useless for others (you're not setting a 30-step count on a 0β100 dial with much precision). The settings input lets you rescale it to whatever you actually need.
The inputs that matter
- num - the value itself, the thing the slider sets. Defaults to 0, and out of the box the range is 0 to 100 in steps of 1.
- settings - an optional JSON string that overrides the slider's bounds. The default is literally
{"min": 0, "max": 100, "step": 1}, and you edit those numbers to reshape the dial. Want a 1β50 slider for sampler steps?{"min": 1, "max": 50, "step": 1}. Want to coarse-tune in tens? Bumpstep.
The single output is int - an INT you plug into any integer socket.
Common issues
The slider ignores my custom range. The settings field is JSON, and it's fussy about it. A missing quote, a trailing comma, single quotes instead of double - any of those and it can't parse, so it falls back to the default 0β100. Copy the default string, change only the numbers, and keep the double quotes.
My value snaps to weird numbers. That's step doing its job. If step is 5, the slider can only land on multiples of 5. Set step to 1 for fine control.
It's an integer, so no decimals. Obvious once said, but if you need a fractional value this is the wrong node - SDVN ships separate float slider widgets for that. This one rounds to whole numbers by design.
Installing SDVN_Comfy_node
ComfyUI Manager: search "SDVN_Comfy_node" β install β restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/StableDiffusionVN/SDVN_Comfy_node
Then pip install -r custom_nodes/SDVN_Comfy_node/requirements.txt from your ComfyUI root and restart. You'll find it under π SDVN / π‘ Creative. No models or heavy dependencies for this one - it's pure UI.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| num | INT | 00β100 | β |
| settingsopt | STRING | {"min": 0, "max": 100, "step": 1} | Slider configuration used by popup (JSON). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| int | INT | β |