autocast.processors.flow_matching#
- class FlowMatchingProcessor(*, backbone, flow_ode_steps=1, n_steps_output=4, n_channels_out=1)[source]#
Bases:
ProcessorProcessor that wraps a flow-matching generative model.
- flow_field(z, t, x, global_cond=None)[source]#
Flow matching vector field.
The vector field over the tangent space of output states (z). conditioned on input states (x) at time (t).
- Parameters:
- Returns:
Time derivative of output states with the same shape as z.
- Return type:
- map(x, global_cond)[source]#
Map inputs states (x) to output states (z) by integrating the flow ODE.
Starting from noise, Euler-integrate the learned vector field until t=1.
- loss(batch)[source]#
Compute flow-matching loss for a batch.
- Parameters:
batch (EncodedBatch)
- Return type: