Perform a FlowMatch scheduler step
Description
Performs a single denoising step using Euler integration. This is the core sampling function for FlowMatch models.
Usage
flowmatch_scheduler_step(model_output, timestep, sample, schedule,
generator = NULL)
Arguments
model_output: torch tensor. The output from the diffusion model (velocity prediction).timestep: Numeric. The current timestep.sample: torch tensor. The current noisy sample.schedule: List. The FlowMatch scheduler object.generator: torch generator or NULL. Random generator for reproducibility.
Details
The FlowMatch Euler step is remarkably simple:
prev_sample = sample + dt * model_output
where dt = sigma_next - sigma_current.
This implements the Euler method for solving the probability flow ODE in continuous normalizing flows.
Value
A list containing:
- prev_sample: The denoised sample at the previous timestep
- schedule: The updated scheduler with incremented step_index