ComfyUI Node

ScaleToRange

Fit any sigma curve to the range your model actually wants

By mfg637·Created 2 years ago·Updated about a year ago· 11
ScaleToRange
  • sigmas
  • SIGMAS
sigma_min0.0
sigma_max8.0

ScaleToRange is the most quietly useful node in this pack, because it's the fix for the pack's own quirk: the bundled schedulers (CosineScheduler, GaussianScheduler, k/x, and friends) all default to producing sigmas between 0 and 1. That's a great range if you're drawing a CFG curve for a guider, and a terrible range if you're trying to build an actual denoise schedule - real samplers expect sigma values like 14.7 down to 0.03, depending on your model.

This node takes any SIGMAS array and min-max rescales it so it lands exactly between a sigma_min and sigma_max you choose. Same shape, new range. That's the whole job, and it's the missing piece between "I like this curve" and "this curve actually works as a schedule."

How it works

It finds the smallest and largest values in your input, then stretches the whole thing linearly so the minimum maps to sigma_min and the maximum maps to sigma_max. Nothing about the relative shape changes - a curve that dips in the middle still dips in the middle; it just now lives in your chosen range.

Which is why it pairs so naturally with the pack's own scheduler nodes. Run GaussianScheduler, decide the bell shape is what you want, then ScaleToRange it up to your model's sigma range and feed the result to a KSampler. You've just built a custom schedule from scratch.

The inputs and output

  • sigmas - the schedule to rescale.
  • sigma_min (0.0) / sigma_max (8.0) - your target range. Defaults are conservative; a real SD 1.5 run wants a max closer to 14.79, and the right values ultimately come from your model's own sigma_max.
  • Output: SIGMAS - same length, same shape, rescaled.

Install

Part of ComfyUI-ScheduledGuider-Ext. ComfyUI Manager - search ComfyUI-ScheduledGuider-Ext - or:

cd ComfyUI/custom_nodes
git clone https://github.com/mfg637/ComfyUI-ScheduledGuider-Ext

Restart ComfyUI. No models, no extra dependencies.

Common issues

Two easy traps. First, if you scale a schedule that was already at your target range, nothing visibly happens - it's idempotent, and that's fine, not a bug. Second, remember that for a CFG-guider curve the absolute range genuinely doesn't matter (the guider normalizes the shape itself), so scaling a guider curve to "realistic" sigma values is wasted effort - this node earns its keep when the sigmas are going to an actual sampler schedule instead.

Categorysampling/custom_sampling/sigmas

Inputs (3)

NameTypeDefaultDescription
sigmasSIGMAS
sigma_minFLOAT0.0-5000–5000
sigma_maxFLOAT8.0-5000–5000

Outputs (1)

NameTypeDescription
SIGMASSIGMAS