EmAySee Dynamic Range Slider
Drive any slider from a 0–1 value — percent in, real range out
- value
A lot of ComfyUI automation boils down to "take a value between 0 and 1 and turn it into a real number." That's exactly what this node does. Give it a percentage (value_percent) and a target range, and it outputs a float inside that range, snapped to a step you choose. If you're driving CFG strength, denoise, or an aspect-ratio knob from something that outputs normalized values - a randomizer, a batch counter, an animation LFO - this is the adapter that makes the two talk.
How it works
The math is: min_val + (value_percent * (max_val - min_val)), then round to the nearest step_val, then clamp between min and max. Three details make it less naive than it looks:
- It auto-swaps reversed ranges. If
min_val > max_val, it flips them before computing. Sloppy-friendly. - It quantizes. With
step_valof 0.25, avalue_percentof 0.37 doesn't give you a float with nine decimals - it snaps to the nearest step. That keeps downstream widgets and prompt text tidy. - It clamps. Output is guaranteed inside
[min_val, max_val], so avalue_percentof 1.0 can't overshoot.
Inputs and outputs
min_val(FLOAT, default -1) andmax_val(FLOAT, default 2) - the range.step_val(FLOAT, default 0.25, min 0.001) - the quantization step.value_percent(FLOAT, default 0.5, 0–1) - the normalized position in the range.
Output: value, a FLOAT. Wire it into anything that takes a float - a KSampler's cfg, an Empty Latent's size via a multiplier, a denoise value, or a conditional comparison.
Where it earns its place
The killer use is animation and batch control: instead of hand-typing 30 different CFG values, feed value_percent from a counter or an eased curve and let this node map it across a range. It's also the natural partner for the pack's EmAySee_DynamicStringSelectorNode and EmAySee_GreaterThanNode when you're building conditional branches that depend on where a value currently sits.
Install
Part of the ComfyUI_EmAySee_CustomNodes pack. ComfyUI Manager → search "EmAySee" → install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/EmAySee/ComfyUI_EmAySee_CustomNodes
No dependencies beyond ComfyUI's bundled math (it's in the standard library), no model files. Restart, and you'll see the pack's "SPECTRE v5.0" banner in the console.
The honest take
It's a small node, but it's the kind of small node you end up using in every animation workflow once you know it exists. The default range (-1 to 2) is odd - clearly tuned for something like a strength/CFG sweep - so set your own min and max and don't trust the defaults. And note value_percent maxes at 1.0, so you can't exceed the range with it; that's a feature for automation, a mild annoyance when you're trying to nudge past the edge by hand.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| min_val | FLOAT | -1.0 | — |
| max_val | FLOAT | 2.0 | — |
| step_val | FLOAT | 0.250 | — |
| value_percent | FLOAT | 0.500–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | FLOAT | — |