Rectified Diffusion: Straightness Is Not Your Need in Rectified Flow
Fu-Yun Wang1 Ling Yang2 Zhaoyang Huang1 Mengdi Wang3 Hongsheng Li1 1MMLab, CUHK, Hong Kong SAR 2Peking University, Beijing, China 3Princeton University, New Jersey, USA
Abstract
Diffusion models have greatly improved visual generation but are hindered by slow generation speed due to the computationally intensive nature of solving generative ODEs. Rectified flow, a widely recognized solution, improves generation speed by straightening the ODE path. Its key components include: 1) using the diffusion form of flow-matching, 2) employing $\bm{v}$ -prediction, and 3) performing rectification (a.k.a. reflow). In this paper, we argue that the success of rectification primarily lies in using a pretrained diffusion model to obtain matched pairs of noise and samples, followed by retraining with these matched noise-sample pairs. Based on this, components 1) and 2) are unnecessary. Furthermore, we highlight that straightness is not an essential training target for rectification; rather, it is a specific case of flow-matching models. The more critical training target is to achieve a first-order approximate ODE path, which is inherently curved for models like DDPM and Sub-VP. Building on this insight, we propose Rectified Diffusion, which generalizes the design space and application scope of rectification to encompass the broader category of diffusion models, rather than
中文速览
扩散模型(diffusion model)生成质量很高,但因为要反复迭代求解ODE方程,生成速度很慢;目前流行的加速方案"整流流"(rectified flow)通过把ODE路径"拉直"来减少所需步骤,但它要求模型必须采用特定的flow-matching形式和v-prediction预测类型,限制了通用性。作者深入分析后发现,整流流真正有效的核心只有一点:用预训练扩散模型生成"噪声-图像配对数据",再用这些配对重新训练模型;flow-matching和v-prediction其实都不是必要条件,而"路径要直"也只是flow-matching这一特殊情况下的副产品,更本质的训练目标是让模型获得"一阶近似ODE路径"(first-order ODE path),对于DDPM等模型这条路径天然是弯曲的。基于此,作者提出"整流扩散"(Rectified Diffusion),把整流思想推广到DDPM、EDM、Sub-VP等各类扩散模型,整个流程几乎不改动原模型的任何设置,只需替换训练数据中的噪声-样本对。在Stable Diffusion v1-5和SDXL上的实验表明,该方法不仅大幅简化了训练流程,还以远低于InstaFlow的训练代价实现了更好的一步/少步生成效果,对加速大规模扩散模型的实际部署具有重要意义。
原文 arXiv:2410.07303;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2410.07303v2