For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Python class
FlowMatchEulerDiscreteScheduler
FlowMatchEulerDiscreteSchedulerβ
class max.pipelines.diffusion.schedulers.FlowMatchEulerDiscreteScheduler(base_image_seq_len=256, max_image_seq_len=4096, base_shift=0.5, max_shift=1.15, use_flow_sigmas=False, use_dynamic_shifting=False, use_empirical_mu=False, shift_terminal=None, order=1, **unused_kwargs)
Bases: object
Minimal Flow Match Euler Discrete Scheduler.
This scheduler provides timestep and sigma scheduling for flow-matching diffusion models. The actual denoising step computation is handled by the pipeline (e.g., FluxPipeline._scheduler_step).
Initialize the scheduler.
-
Parameters:
-
- base_image_seq_len (int) β Base image sequence length.
- max_image_seq_len (int) β Maximum image sequence length.
- base_shift (float) β Base shift.
- max_shift (float) β Maximum shift.
- use_flow_sigmas (bool) β Whether to use flow sigmas.
- use_dynamic_shifting (bool) β Whether to use dynamic shifting.
- use_empirical_mu (bool) β Whether to use empirical mu.
- shift_terminal (float | None) β If set, stretch shifted sigmas so the last sigma equals this value instead of 1/num_steps.
- order (int) β Order of the scheduler.
- **unused_kwargs β Unused keyword arguments.
retrieve_timesteps_and_sigmas()β
retrieve_timesteps_and_sigmas(image_seq_len, num_inference_steps, reverse=False, sigma_min=None)
Retrieve timesteps and sigmas for the diffusion process.
-
Parameters:
-
- image_seq_len (int) β Length of image sequence (H*W after packing).
- num_inference_steps (int) β Number of inference steps.
- reverse (bool) β Whether to reverse the timesteps and sigmas.
- sigma_min (float | None) β Optional terminal sigma for the base schedule before shifting. If None, defaults to 1 / num_inference_steps
-
Returns:
-
Tuple of timesteps and sigmas.
-
Return type:
-
tuple[ndarray[tuple[Any, β¦], dtype[float32]], ndarray[tuple[Any, β¦], dtype[float32]]]
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!