Improving the Training of Rectified Flows

Sangyun Lee, Zinan Lin, Giulia Fanti
5/30/2024
cs.CVcs.AIcs.LG

Official code: sangyun884/rfpp (134 stars, BSD-3-Clause-Clear, last commit 2024-10-18).

Abstract

Diffusion models have shown great promise for image and video generation, but sampling from state-of-the-art models requires expensive numerical integration of a generative ODE. One approach for tackling this problem is rectified flows, which iteratively learn smooth ODE paths that are less susceptible to truncation error. However, rectified flows still require a relatively large number of function evaluations (NFEs). In this work, we propose improved techniques for training rectified flows, allowing them to compete with \emph{knowledge distillation} methods even in the low NFE setting. Our main insight is that under realistic settings, a single iteration of the Reflow algorithm for training rectified flows is sufficient to learn nearly straight trajectories; hence, the current practice of using multiple Reflow iterations is unnecessary. We thus propose techniques to improve one-round training of rectified flows, including a U-shaped timestep distribution and LPIPS-Huber premetric. With these techniques, we improve the FID of the previous 2-rectified flow by up to 75\% in the 1 NFE setting on CIFAR-10. On ImageNet 64$\times$64, our improved rectified flow outperforms the state-of-the-art distillation methods such as consistency distillation and progressive distillation in both one-step and two-step settings and rivals the performance of improved consistency training (iCT) in FID. Code is available at https://github.com/sangyun884/rfpp.

View on arXivView PDF

Code Implementations(1)

sangyun884/rfppOfficial100%
BSD-3-Clause-Clear

The codebase of our paper "Improving the Training of Rectified Flows", NeurIPS 2024

1348PythonMay 24, 20242 years agoBSD-3-Clause-Clear

Similar Papers

Cite this paper

@article{lee2024improving,
  title  = {Improving the Training of Rectified Flows},
  author = {Sangyun Lee and Zinan Lin and Giulia Fanti},
  year   = {2024},
  eprint = {2405.20320},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2405.20320},
  url    = {http://arxiv.org/abs/2405.20320v2},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.20320.svg)](https://codeofpaper.com/paper/2405.20320)

Discussion