MSCOCO-256 text-to-image generation
| Method | Model | FID ↓ |
|---|---|---|
| MMDiT | Flow Matching | 6.05 |
| MMDiT+REPA | Flow Matching | 4.73 |
| MMDiT+MeanFlow | Flow Matching | 5.02 |
| MMDiT+BiFM | Flow Matching | 4.57 |
A unified flow matching framework that learns generation and inversion in one model, enabling accurate few-step image editing without DDIM-style reverse-time approximation or auxiliary inversion networks.
Few-step editing is hard because inversion is usually approximated by numerically reversing a generator that was only trained in the forward direction. BiFM directly learns both generation and inversion as average velocities under one shared flow field, reducing inversion drift while also improving generation quality.
Core idea
Bidirectional flow
Learn image-to-noise and noise-to-image intervals within one model.
Training
Interval supervision
Predict average velocities over arbitrary continuous time intervals.
Editing
Fewer inversion errors
Avoid DDIM approximation and extra inversion networks.
Generation
Better FID
Improves MMDiT, SiT, and U-Net style settings in the paper.
Diffusion and flow models learn strong multi-step generation dynamics, but inversion-based editing requires the opposite path: from a source image back to noise or an intermediate latent. In few-step regimes, each update spans a large time interval, so reverse-time approximation errors quickly become visible as background drift, geometry distortion, or lost local detail.
Running a forward generator backward inherits solver and local linearization errors. Those errors are amplified when the edit budget is one or a few steps.
Extra inversion modules can improve fidelity, but they introduce more parameters, training cost, and architecture-specific assumptions.
Both time directions are constrained by the same instantaneous velocity field, so generation and inversion are learned as two views of the same dynamics.
BiFM extends time-interval flow matching by asking the network for the average velocity needed to travel from time $t$ to time $t'$. The same model is queried in both directions: \(u_\theta(x_t,t,t')\) for generation and \(u_\theta(x_{t'},t',t)\) for inversion. A bidirectional consistency term encourages these velocities to be negatives of one another along the same trajectory.
\(u(x_t,t,t') = \frac{1}{t'-t}\int_t^{t'} v(x_\tau,\tau)d\tau\)
\(u_\theta(x_t,t,t') \approx -u_\theta(x_{t'},t',t)\)
\(\mathcal{L}=\mathcal{L}_{MF}+w(t,t')\mathcal{L}_{BiFM}\)
BiFM is evaluated as a unified framework for inversion, prompt-guided editing, and image generation. The headline numbers below summarize the main empirical evidence from the paper.
Reconstruction
30.32 PSNR
Best PIE-Bench reconstruction PSNR, with best MSE, LPIPS, and SSIM among evaluated inversion methods.
Few-step editing
87.29 SSIM
With 4 NFEs, BiFM improves structural preservation over DDIM, ReNoise, and TurboEdit.
Text-to-image
4.57 FID
MMDiT+BiFM improves MSCOCO-256 FID over vanilla MMDiT, REPA, and MeanFlow settings.
One-step CIFAR-10
2.75 FID
Best one-step FID among Rectified Flow, sCT, MeanFlow, and BiFM in the reported comparison.
Accurate editing begins with accurate inversion. BiFM reconstructs source structure and local details more faithfully than baseline inversion methods.












BiFM is highlighted in amber. The learned backward flow preserves global layout while recovering fine local details.
Because BiFM can invert a source image with fewer steps, the forward edit has a cleaner starting point. The examples below show source-to-BiFM edits from the paper's qualitative comparison.
tulip → lion
colorful → red
fruits → pizza
torch → flower
sea → forest
The same bidirectional time-interval training is not limited to editing. BiFM improves generation quality when training from scratch and when fine-tuning stronger backbones.
| Method | Model | FID ↓ |
|---|---|---|
| MMDiT | Flow Matching | 6.05 |
| MMDiT+REPA | Flow Matching | 4.73 |
| MMDiT+MeanFlow | Flow Matching | 5.02 |
| MMDiT+BiFM | Flow Matching | 4.57 |
| Setting | Method | FID ↓ | NFE |
|---|---|---|---|
| Multi-step | Flow Matching | 2.63 | 50 |
| Multi-step | BiFM | 2.17 | 50 |
| One-step | sCT | 2.85 | 1 |
| One-step | MeanFlow | 2.92 | 1 |
| One-step | BiFM | 2.75 | 1 |
| Model | FID ↓ | IS ↑ | Precision ↑ | Recall ↑ |
|---|---|---|---|---|
| MaskDiT | 2.28 | 276.6 | 0.80 | 0.61 |
| DiT-XL/2 | 2.27 | 278.2 | 0.83 | 0.57 |
| SiT-XL/2 | 2.06 | 270.3 | 0.82 | 0.59 |
| SiT-XL/2+BiFM | 1.92 | 277.3 | 0.84 | 0.62 |
BiFM removes the need to approximate reverse-time dynamics with DDIM-style inversion or attach an auxiliary inversion network.
Learning both directions under one shared flow improves source preservation, local detail reconstruction, and semantic editability.
The same bidirectional interval training improves generation metrics across MMDiT, SiT, and U-Net style backbones.
@inproceedings{dai2026bifm,
title = {BiFM: Bidirectional Flow Matching for Few-Step Image Editing and Generation},
author = {Dai, Yasong and Hayder, Zeeshan and Ahmedt-Aristizabal, David and Li, Hongdong},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
year = {2026}
}