WanVideo Sigma To Step
Turn a sigma threshold into a step number
- step
Tiny node, single job: it converts a sigma value into a step number. The node's own description is admirably blunt - it "simply passes a float value as an integer, used to set start/end steps with sigma threshold." That's it. You give it a sigma between 0 and 1, it tells you which step that corresponds to, and you use that integer to set where some other thing kicks in.
Why would you want this? Because a lot of Wan tuning happens in terms of noise level (sigma), but a lot of node inputs want a step index. Wan 2.2's two-expert design is the classic case: the KB explains the model "splits denoising between a high-noise expert (motion, composition) and a low-noise expert (detail)," and best practice is to apply speed LoRAs "to the low-noise pass only." The handoff between those experts happens at a noise threshold, not a fixed step. If you want a LoRA or a CFG change to start exactly when the low-noise phase begins, you think in sigma but the scheduler wants a step. This node bridges that.
How it works
Sigma is the amount of noise remaining at a point in sampling - high at the start, near zero at the end. Given a sampler's schedule, each step sits at a particular sigma. This node maps your chosen sigma to the nearest step index so you can hand that integer wherever a "start step" or "end step" is expected.
The input and output
sigma(FLOAT, default 0.9, range 0–1) - the noise threshold you care about. Higher sigma is earlier in sampling; 0.9 is quite early. Set it to wherever you want your phase boundary.
The single output is step (INT) - the step index at that sigma, ready to plug into a start/end-step input on another node.
That's the entire surface. There's nothing else to configure and no model to load.
How to install it
It's bundled in Kijai's WanVideoWrapper. ComfyUI Manager: search ComfyUI-WanVideoWrapper, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper
pip install -r ComfyUI-WanVideoWrapper/requirements.txt
then restart. Zero downloads, zero dependencies of its own - it's arithmetic.
Common issues & troubleshooting
The step doesn't match what you expected. The mapping depends on the sampler schedule in play. A sigma of 0.9 lands at a different step under a 20-step schedule than a 6-step one, and shift/scheduler choice moves the sigmas around. If the number surprises you, check what schedule this is being computed against - the node isn't wrong, your mental model of where 0.9 falls might be.
You wanted a fraction, not a threshold. If you actually want "start at 50% of the way through," a percent-based input is simpler than converting sigma. Use this node specifically when your boundary is naturally a noise level - like the Wan 2.2 high/low expert handoff - not when it's just "halfway."
Off-by-one at the edges. Sigma 1.0 and 0.0 map to the ends of the schedule; if you need "the very first" or "the very last" step, feel free to set the boundary a hair inside rather than exactly at the extreme.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| sigma | FLOAT | 0.9000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| step | INT | — |