Nodes/ComfyUI/SamplingPercentToSigma
ComfyUI Node Runs on cloud

SamplingPercentToSigma

What sigma is 70% of the way through sampling, anyway?

By Comfy-Org·Created 4 years ago·Updated 4 minutes ago· 129,952
SamplingPercentToSigma
  • model
  • sigma_value
sampling_percent0.0000
return_actual_sigmafalse

SamplingPercentToSigma answers one boring-sounding question that turns out to matter a lot in custom sampling: what noise level corresponds to X percent of the way through denoising? It takes your model, a percentage from 0 to 1, and returns the sigma value sitting at that point on the model's own noise schedule. It's a tiny node with no sampler in sight - the output is a plain FLOAT - but it's the glue that lets you build and reason about custom sigma pipelines instead of guessing at numbers.

How it works

The model wrapper already knows its noise curve: for any timestep it can tell you the sigma, and percent_to_sigma inverts that. Sampling percent 0 means "the very start" - pure noise - and 1 means "the end" - clean. The node interpolates the model's sigma curve at the requested fraction and returns that sigma as a float.

Inputs:

  • model - any MODEL. Important: the answer is schedule-specific. 70% on an SD 1.5 schedule is not 70% on a Flux schedule, because each model has its own sigma curve.
  • sampling_percent (default 0, 0-1) - where to look.
  • return_actual_sigma (default false) - and here's the subtlety. The node's tooltip spells it out: at exactly 0% it returns a sentinel 999999999.9, and at exactly 100% it returns 0.0 - the values used for interval checks, not the real sigmas. Flip this boolean on and you get the actual sigma_max / sigma_min at those two endpoints instead.

Output: sigma_value, a FLOAT.

Why you'd reach for it

Two honest use cases. First, feeding values into ManualSigmas - you want a custom schedule that stops at "roughly 80% through", and this node gives you the exact sigma to type in. Second, driving logic in your graph: you can compare a sigma against this value and branch a workflow, which is exactly what the "interval checks" phrasing in the tooltip is about. If you've ever stared at a ManualSigmas widget wondering what a reasonable sigma even is, this is the lookup that answers you.

Where people get burned

  • The sentinel isn't a bug. 999999999.9 at 0% is intentional - it's a value that compares greater than any real sigma, which is what an interval check wants. If you expected to see the model's actual max noise, flip return_actual_sigma.
  • Model matters. The result is meaningless without the right model wired in. Ask SD 1.5 and you get one curve; ask Flux and you get another. Same percent, different sigma.
  • It's a float, not a SIGMAS. It won't plug into SamplerCustomAdvanced's sigma input by itself - you use it to build or check schedules, usually via ManualSigmas.

Ships with ComfyUI core. Not glamorous, but the kind of node that makes advanced sampling feel less like numerology.

Categorymodel/sampling/sigmas

Inputs (3)

NameTypeDefaultDescription
modelMODEL
sampling_percentFLOAT0.00000–1
return_actual_sigmaBOOLEANfalseReturn the actual sigma value instead of the value used for interval checks. This only affects results at 0.0 and 1.0.

Outputs (1)

NameTypeDescription
sigma_valueFLOAT