Diffusers Flux Scheduler
Exact Diffusers Flux Scheduling, as SIGMAS for Your Sampler
- SIGMAS
Flux doesn't use a fixed noise schedule - its timesteps are shifted depending on how long the image's token sequence is. ComfyUI's built-in Flux nodes handle this for you, but if you're replicating a diffusers-python workflow bit-for-bit, you want the exact same sigmas the diffusers library computes. DiffusersFluxScheduler is that: it reproduces the diffusers FlowMatchEulerDiscreteScheduler behavior for Flux and hands it to your sampler as SIGMAS.
It's a compatibility node, not a daily-driver. You reach for it when the reference workflow was written against diffusers (the image_seq_len parameter is the giveaway - that's a diffusers-API concept), when you're chasing a specific output that other schedulers aren't matching, or when you want to tweak the sequence-length shift yourself.
How it works
The node implements the shift math directly. It builds evenly spaced sigmas, computes the shift factor mu as a linear interpolation between base and max shift (0.5 → 0.9 across the 256–8192 sequence-length range) from your image_seq_len, applies the exponential time shift, stretches the final step to the terminal value, and appends the zero sigma. That's the same recipe diffusers' Flux scheduler uses under the hood.
The denoise input does partial-denoise handling: if you set it below 1.0, the node computes a larger total step count and slices out the tail, so the sigmas you get cover only the denoise portion - matching how diffusers does strength-based partial sampling.
Inputs
- num_inference_steps (default 50) - how many steps you'll sample.
- image_seq_len (default 256) - the sequence length that drives the shift. 256 is the standard full-res value; shorter sequences shift less. If you're replicating a specific diffusers run, use the exact value the original used.
- denoise (default 1.0) - 1.0 for full sampling, lower for img2img-style partial.
Output is a SIGMAS tensor for your sampler's sigma input.
Installing it
Part of Duanyll Nodepack:
cd ComfyUI/custom_nodes
git clone https://github.com/Duanyll/duanyll_nodepack
or via ComfyUI Manager. Pure math, no model downloads.
Gotchas
This node gives you identical-to-diffusers sigmas, not better ones. If a Flux workflow looks fine with ComfyUI's native scheduler, there's no quality reason to switch - the payoff is reproducibility, not beauty. Also, image_seq_len is not the resolution; it's the token-sequence length (roughly (height/16) × (width/16) for a 16×16 patch model, but Flux uses its own tokenizer mapping, and for a standard 1024² image 256 is the value the reference uses). Get it wrong and the shift is off, which changes the look subtly. And the denoise behavior assumes your sampler honors the given sigmas - wire it into a sampler with a sigma input, not the fixed-schedule ones.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| num_inference_steps | INT | 501–1000 | — |
| image_seq_len | INT | 25616–8192 | — |
| denoise | FLOAT | 1.000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SIGMAS | SIGMAS | — |