Skip to content

About

Interactive dependency-free lab on flow matching, rectified flow & MeanFlow one-step generation

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

MeanFlowLab

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.

Panels

  1. The probability path — watch the noise→data bridge x_t=(1−t)x₀+t·x₁.
  2. Instantaneous vs. average velocity — the field that swirls vs. the field that aims straight.
  3. Sampler race — manifold coverage vs. NFE. One instantaneous Euler step covers 0–18% of the data; one MeanFlow step covers 100%.
  4. Reflow — re-couple noise↔data and watch trajectory curvature collapse toward 1.0.
  5. MeanFlow Identity — u = v − (t−r)·du/dt, verified numerically (median residual ≈ 0.019).

The math (closed form)

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.

Run

Open index.html — that's it.

Credits / concepts

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

About

Interactive dependency-free lab on flow matching, rectified flow & MeanFlow one-step generation

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages