SamplingPercentToSigma (Ray)
Convert a Sampling Percent to a Real Sigma Value
- ray_actors
- sigma_value
Every custom-sampling workflow eventually needs the same bridge: "I think of guidance as 'first 15% of denoising,' but the sampler thinks in sigma values." RaySamplingPercentToSigma is that bridge for Raylight - it converts a 0–1 sampling percent into the model's sigma value, using the model's own sampling object.
The mechanism is a one-liner under the hood: model_sampling.percent_to_sigma(sampling_percent). The model already knows how its own noise schedule maps percent to sigma, so the node just asks it. Two inputs:
sampling_percent(default 0.0) - 0.0 means "the very start of denoising" (maximum noise), 1.0 means "the end" (minimum noise). The output floats accordingly.return_actual_sigma(default false) - this is the subtle one, and the author's own tooltip spells out the gotcha: it returns the actual sigma value instead of the value used for interval checks. The difference only shows up at exactly 0.0 and 1.0 - at those endpoints,percent_to_sigmareturns sentinel-ish values that work for interval comparisons but aren't the literal sigma_max/sigma_min. Flip this on and the node returns the truesigma_maxat 0.0 and truesigma_minat 1.0. Leave it off if you're feeding the output into something doing range checks (like a sigma-threshold comparison).
Output is a single FLOAT (sigma_value). It's a utility, not a patch - it doesn't touch the model at all.
Where it fits
Mostly as plumbing for the pack's own guidance tooling. The natural use: compute a sigma threshold from a percent and feed it into a guider's sigma-based logic (e.g., "apply this only below 0.15"), or build a custom schedule by converting several percents and feeding the floats into list-driven nodes. It's in the custom_sampling/schedulers category, so think of it as a helper you chain before constructing your sampler/guider, not a node that runs during sampling.
Install
Part of raylight:
cd ComfyUI/custom_nodes
git clone https://github.com/komikndr/raylight
cd raylight
pip install -r requirements.txt
Restart, or install "raylight" via ComfyUI Manager.
Gotchas
- The
return_actual_sigmatoggle exists precisely because people hit the 0.0/1.0 discrepancy and thought the node was broken. If you're debugging "why is my sigma 0 at 0%", that's the default interval-check behavior - either flip the toggle or don't sample exactly at the endpoints. - It needs a valid
ray_actorsinput because the model lives on the workers - noRay Init Actorupstream, no sigma. If you just want a standalone percent→sigma math helper on a single GPU, the value is model-dependent anyway, so you'd use ComfyUI's own model-sampling node instead.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| ray_actors | RAY_ACTORS | — | |
| sampling_percent | FLOAT | 0.00000–1 | — |
| return_actual_sigma | BOOLEAN | false | Return the actual sigma value instead of the value used for interval checks. This only affects results at 0.0 and 1.0. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| sigma_value | FLOAT | — |