Number Scaler
Remap a value from one range into another
- FLOAT
A linear "map range" node - the same tool you'd reach for in a game engine, a DAW, or a creative-coding environment. You tell it what range a value lives in, what range you want it converted to, and it does the proportional math: a value at the low end of the input range maps to the low end of the output range, the high end maps to the high end, and everything between scales linearly. Small, but genuinely useful anywhere two parts of a workflow speak in different numeric scales.
The pack's own theme - driving a workflow from external data - is exactly where this earns its place. A JSON field or an API parameter might arrive as a 0–100 "intensity," but the sampler input it needs to drive is a 0–1 denoise. Rather than hand-writing that conversion, NumberScaler does it as a node.
How it works
Given value, min, and max (the range value is assumed to live in) and scale_to_min/scale_to_max (the range you want it mapped into), the node computes where value falls proportionally between min and max, then places that same proportion between scale_to_min and scale_to_max. It's a straight linear remap - no easing, no clamping.
The inputs and outputs that matter
Five inputs, all FLOAT:
value- the number to convert.min/max- the rangevalueis assumed to fall within (defaults1/10).scale_to_min/scale_to_max- the range you want the output mapped into (defaults0/1).
One output: FLOAT - the remapped value, ready for whatever numeric input it's driving.
How to install it
Comes with the Art Venture pack. ComfyUI Manager: search comfyui-art-venture, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/sipherxyz/comfyui-art-venture
Restart ComfyUI. No downloads - pure math, instant load.
Common issues & troubleshooting
Output goes outside the range I set. The node doesn't clamp. If value falls outside min–max - say your JSON source occasionally sends a number above the range you assumed - the result extrapolates outside scale_to_min–scale_to_max too, rather than getting capped. If a downstream parameter can't tolerate an out-of-range value, clamp it with a min/max node after this one, or validate the source data before it reaches the sampler.
Result is flat or wrong regardless of value. Check min and max aren't equal - if they are, there's no range to compute a proportion from, and the math degenerates. This usually means the defaults were left unset for your actual data range.
Scaling feels inverted from what I expect. If scale_to_min is larger than scale_to_max (or min larger than max), the mapping runs backward - a low input produces a high output and vice versa. That's valid and sometimes intentional (inverting a scale), but double-check it's deliberate.
Wanted the integer form for steps or seed. This node only outputs FLOAT. Chain StringToNumber after it, or otherwise convert, if the target input needs an integer.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| min | FLOAT | 1.000–18446744073709550000 | — |
| max | FLOAT | 10.000–18446744073709550000 | — |
| scale_to_min | FLOAT | 0.000–18446744073709550000 | — |
| scale_to_max | FLOAT | 1.000–18446744073709550000 | — |
| value | FLOAT | 0.000–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | — |