Live: https://meanflowlab.vercel.app One step, not fifty — the average-velocity field.
An interactive, zero-dependency lab explaining how modern generative models (flow matching, rectified flow, and 2025–26 MeanFlow) turn noise into data — and why learning the time-averaged velocity lets them generate in a single step instead of dozens of ODE steps.
Everything is computed live in your browser from a 2-D point cloud: the exact marginal flow-matching velocity field, the MeanFlow average velocity, reflow straightening, and a numerical check of the MeanFlow Identity. No neural net, no pretrained weights, no libraries.
- The probability path — watch the noise→data bridge
x_t=(1−t)x₀+t·x₁. - Instantaneous vs. average velocity — the field that swirls vs. the field that aims straight.
- Sampler race — manifold coverage vs. NFE. One instantaneous Euler step covers 0–18% of the data; one MeanFlow step covers 100%.
- Reflow — re-couple noise↔data and watch trajectory curvature collapse toward 1.0.
- MeanFlow Identity —
u = v − (t−r)·du/dt, verified numerically (median residual ≈ 0.019).
Gaussian source, optimal-transport path. The marginal velocity of an empirical
target {x₁ⁱ} is exactly
v(x,t) = Σ_i w_i (x₁ⁱ − x)/(1−t), w_i ∝ exp(−‖x − t·x₁ⁱ‖² / 2(1−t)²)
and the MeanFlow average velocity is u(x,r,t) = (z_t − z_r)/(t−r) along the flow.
Open index.html — that's it.
Lipman et al. Flow Matching for Generative Modeling; Liu et al. Rectified Flow; Geng et al. Mean Flows for One-step Generative Modeling (2025) and the 2026 Re-MeanFlow / Rectified-MeanFlow line. Educational reconstruction, not affiliated with the authors.
MIT License · part of a daily autonomous webapp series · github.com/middesurya