Nodes/comfyui-cx_sliders/cxSlider - Int
ComfyUI Node

cxSlider - Int

An actual drag slider for integers, instead of a cramped text box

By VirusShell·Created 4 months ago·Updated 7 days ago· 1
cxSlider - Int
    • INT
    ◄value1►

    ComfyUI's default way of changing an integer is a text box that only lets you in after a click, or a spin widget that hides half its value. cxSliderInt from the comfyui-cx_sliders pack replaces that with an actual draggable bar: grab it, drag, and the number follows your mouse. It's a UI convenience, full stop - the kind of thing that sounds trivial until you spend an afternoon sweep-testing an integer parameter and your wrist stops hurting.

    It shines in the discipline the community keeps rediscovering: change one variable at a time with a fixed seed, and compare. If you're farming a number like steps, batch size, or a LoRA's preferred resolution, a slider makes "nudge and re-roll" a lot less clicky.

    How it works

    The node is one value input (INT, default 1, full int32 range from -2147483648 to 2147483647) and one INT output. The drag feel comes from a custom JavaScript widget in the pack's js/ folder - the slider draws the fill, border, and current value itself, and when you release, the rounded integer flows straight through to whatever you've wired INT into.

    What you'll actually fiddle with lives in the Properties panel, not the sockets:

    • min / max - clamp the range so you can't drag somewhere dumb.
    • step - how far a snap jump goes.
    • snap - on by default; values land exactly on step boundaries.

    Two keyboard modifiers are worth memorizing because they're the difference between "fiddly" and "useful":

    • Shift + drag inverts snap - so when snap is off you get temporary stepping, and when it's on you get fine control without it.
    • Ctrl + drag lets you exceed the min/max range on the fly, which is handy for that one experiment that needs a value outside your careful bounds.

    Double-click the widget and a dialog pops up for typing an exact number - no slider-thrashing to hit 137 precisely.

    Install

    cxSliderInt is part of the comfyui-cx_sliders pack; one install covers every node in it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/VirusShell/comfyui-cx_sliders.git comfyui_cxslider
    

    Restart ComfyUI, or grab it via ComfyUI Manager under cx Sliders. No dependencies, no model files - it's all UI. The widgets need ComfyUI 0.3.75+, so if you're on an older build, update first.

    Troubleshooting

    • Values feel sticky or jumpy - that's snap. Hold Shift while dragging, or turn snap off in Properties.
    • Slider won't reach the number you want - either the range is clamped (raise min/max) or you're hitting step boundaries (lower step, or Shift-drag).
    • You see a plain text field instead of a bar - the custom widget didn't load, which almost always means an outdated ComfyUI or that the browser cached the old frontend. Hard-refresh (Ctrl+Shift+R) after upgrading.
    Categoryutils/cxSliders

    Inputs (1)

    NameTypeDefaultDescription
    valueINT1-2147483648–2147483647—

    Outputs (1)

    NameTypeDescription
    INTINT—