Skip to main content
QUICK REVIEW

[Paper Review] InstaFlow: One Step is Enough for High-Quality Diffusion-Based Text-to-Image Generation

Xingchao Liu, Xiwen Zhang|arXiv (Cornell University)|Sep 12, 2023
Generative Adversarial Networks and Image SynthesisComputer Science20 citations
TL;DR

InstaFlow turns Stable Diffusion into a high-quality one-step text-to-image generator using Rectified Flow and distillation, achieving SD-level image quality in about 0.09s per image with low training cost.

ABSTRACT

Diffusion models have revolutionized text-to-image generation with its exceptional quality and creativity. However, its multi-step sampling process is known to be slow, often requiring tens of inference steps to obtain satisfactory results. Previous attempts to improve its sampling speed and reduce computational costs through distillation have been unsuccessful in achieving a functional one-step model. In this paper, we explore a recent method called Rectified Flow, which, thus far, has only been applied to small datasets. The core of Rectified Flow lies in its \emph{reflow} procedure, which straightens the trajectories of probability flows, refines the coupling between noises and images, and facilitates the distillation process with student models. We propose a novel text-conditioned pipeline to turn Stable Diffusion (SD) into an ultra-fast one-step model, in which we find reflow plays a critical role in improving the assignment between noise and images. Leveraging our new pipeline, we create, to the best of our knowledge, the first one-step diffusion-based text-to-image generator with SD-level image quality, achieving an FID (Frechet Inception Distance) of $23.3$ on MS COCO 2017-5k, surpassing the previous state-of-the-art technique, progressive distillation, by a significant margin ($37.2$ $ ightarrow$ $23.3$ in FID). By utilizing an expanded network with 1.7B parameters, we further improve the FID to $22.4$. We call our one-step models \emph{InstaFlow}. On MS COCO 2014-30k, InstaFlow yields an FID of $13.1$ in just $0.09$ second, the best in $\leq 0.1$ second regime, outperforming the recent StyleGAN-T ($13.9$ in $0.1$ second). Notably, the training of InstaFlow only costs 199 A100 GPU days. Codes and pre-trained models are available at \url{github.com/gnobitab/InstaFlow}.

Motivation & Objective

  • Motivate ultra-fast, high-quality text-to-image generation with a single-step diffusion process.
  • Address the difficulty of distilling large diffusion models due to poor noise-image coupling.
  • Leverage Rectified Flow reflow to straighten probability trajectories and improve distillation feasibility.
  • Demonstrate one-step generation performance comparable to GANs on large datasets.
  • Quantify training cost and inference speed relative to prior distilled diffusion approaches.

Proposed method

  • Adopt Rectified Flow to learn a text-conditioned velocity field that transports noise to image distributions in one step.
  • Apply the reflow procedure to straighten ODE trajectories, preserving the target distribution while improving coupling.
  • Fine-tune from Stable Diffusion to obtain k-Rectified Flow, then distill to a one-step model using a similarity loss (LPIPS).
  • Incorporate text-conditioned velocity fields withClassifier-Free Guidance to balance quality and diversity (α parameter).
  • Scale from SD 1.4 to SD 1.5 with expanded networks and staged reflow/distillation pipelines for higher fidelity.

Experimental results

Research questions

  • RQ1Can a one-step diffusion-based text-to-image model match Stable Diffusion quality on large datasets?
  • RQ2Does Rectified Flow reflow improve noise-image coupling sufficiently to enable effective distillation to one step?
  • RQ3What is the impact of text conditioning and guidance on one-step generation performance?
  • RQ4What are the training costs and inference speeds achievable for large-scale one-step SD models?

Key findings

  • One-step InstaFlow achieves SD-level image quality with FID 23.3 on MS COCO 2017-5k, outperforming progressive distillation (37.2→23.3).
  • Using an expanded 1.7B-parameter network yields FID 22.4 on MS COCO 2017-5k in 0.09s per image.
  • On MS COCO 2014-30k, InstaFlow yields FID 13.1 in 0.09s, outperforming StyleGAN-T (13.9 in 0.1s).
  • Training InstaFlow costs 199 A100 GPU days, substantially lower than training SD or GAN-based counterparts.
  • Reflow is essential: direct distillation from SD fails, while 2-Rectified Flow enables effective distillation and high-quality one-step results.
  • The pipeline supports text-conditioned reflow and distillation achieving competitive results with pure supervised learning.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.