Nodes/RES4LYF/Sigmas Resample
ComfyUI Node Runs on cloud

Sigmas Resample

Stretch or compress a schedule to a different step count

By ClownsharkBatwing·Created 2 years ago·Updated 21 days ago· 1,222
Sigmas Resample
  • sigmas_in
  • sigmas
output_length0
mode
order8
rescale_aftertrue

Say you've found a sigma schedule you like - hand-tuned through a chain of other Sigmas- nodes, or lifted from a workflow someone shared - but it has 30 steps and your model needs 20. Regenerating a whole new schedule from scratch loses whatever made the original one worth keeping. Resample interpolates instead: it stretches or compresses an existing schedule to a new step count while, per the node's own description, clamping the start and end values so the schedule still begins and ends where it should.

It's a genuinely practical node in a pack full of exotic experiments - one of the few here that solves an ordinary, everyday problem: "I like this shape, I just need a different number of steps."

The inputs and outputs that matter

sigmas_in is the schedule to resample, and output_length is the step count you want back. mode picks the interpolation method: linear, nearest, polynomial, exponential, power, or model. For most cases linear is the safe default - it just draws straight lines between your existing points at the new spacing. The curved modes (polynomial, exponential, power) use order to control how aggressively they bend the interpolation rather than just connecting points directly.

rescale_after carries its own tooltip from the node itself: "Rescale the output to the original min/max range after interpolation." Leave it on if you want a guarantee that the resampled schedule spans exactly the same range the input did, regardless of what the interpolation method did internally. The single output is sigmas.

The model mode is worth calling out separately from the rest - where linear through power are all generic curve-fitting methods that don't know anything about diffusion, model is presumably interpolating with awareness of how sampling schedules actually behave rather than treating your sigma values as arbitrary numbers on a graph. If you're resampling something that needs to stay physically sensible as a noise schedule rather than just numerically smooth, that's the mode worth trying first, ahead of the purely mathematical ones.

Installing it

ComfyUI Manager: search RES4LYF, install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF/
cd RES4LYF
pip install -r requirements.txt

Use the portable install's embedded pip.exe if that's your setup. Restart and hard-refresh the page.

Where people get tripped up

order only matters for the polynomial, exponential, and power modes - set it high and those curves can overshoot or ring near the sharp ends of the schedule, showing up as a jagged or oddly-spaced first or last few steps. If a resampled schedule looks off specifically at its edges, drop order or switch to linear before assuming the source schedule was the problem.

The other thing worth checking: output_length defaults to 0. Leave it there and you likely won't get the resample you're expecting - set it explicitly to the step count your downstream sampler is actually configured for.

CategoryRES4LYF/sigmas

Inputs (5)

NameTypeDefaultDescription
sigmas_inSIGMAS
output_lengthINT00–10000
modeCOMBO6 options: linear, nearest, polynomial, exponential, power, model
orderINT81–64
rescale_afterBOOLEANtrueRescale the output to the original min/max range after interpolation.

Outputs (1)

NameTypeDescription
sigmasSIGMAS