Skip to main content
QUICK REVIEW

[논문 리뷰] InstaFlow: One Step is Enough for High-Quality Diffusion-Based Text-to-Image Generation

Xingchao Liu, Xiwen Zhang|arXiv (Cornell University)|2023. 09. 12.
Generative Adversarial Networks and Image SynthesisComputer Science인용 수 20
한 줄 요약

InstaFlow는 Rectified Flow와 증류를 활용하여 Stable Diffusion을 고품질의 한 단계 텍스트-이미지 생성기로 바꾸며, 약 0.09초당 이미지 품질을 SD 수준으로 달성하고 낮은 학습 비용을 실현한다.

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}.

연구 동기 및 목표

  • 단일 단계 확산 프로세스로 초고속이고 고품질의 텍스트-이미지 생성을 촉진한다.
  • 노이즈-이미지 결합이 불량하여 대형 확산 모델을 증류하는 데 어려움을 해결한다.
  • 확률 궤적을 바로잡고 증류 가능성을 높이기 위해 Rectified Flow의 reflow를 활용한다.
  • 대규모 데이터셋에서 GAN과 견줄 만큼의 한 단계 생성 성능을 입증한다.
  • 이전의 증류 확산 방법과 비교한 학습 비용과 추론 속도를 정량화한다.

제안 방법

  • Rectified Flow를 도입하여 노이즈를 한 단계로 이미지 분포로 운반하는 텍스트 조건부 속도장을 학습한다.
  • ODE 궤적을 바로잡기 위한 reflow 절차를 적용하여 타깃 분포를 보존하면서 결합을 개선한다.
  • Stable Diffusion에서 미세조정하여 k-Rectified Flow를 얻은 다음, 유사도 손실(LPIPS)을 이용해 한 단계 모델로 증류한다.
  • 품질과 다양성을 균형 있게 하기 위해 텍스트 조건부 속도장을 Classifier-Free Guidance와 결합한다(α 매개변수).
  • 더 높은 충실도를 위해 확장된 네트워크와 단계적 reflow/distillation 파이프라인으로 SD 1.4에서 SD 1.5로 확장한다.

실험 결과

연구 질문

  • RQ1한 단계 확산 기반 텍스트-이미지 모델이 대규모 데이터셋에서 Stable Diffusion의 품질과 일치할 수 있는가?
  • RQ2Rectified Flow reflow가 노이즈-이미지 결합을 충분히 개선하여 한 단계로의 효과적인 증류를 가능하게 하는가?
  • RQ3텍스트 조건화와 가이드가 한 단계 생성 성능에 미치는 영향은 무엇인가?
  • RQ4대규모 한 단계 SD 모델에서 달성 가능한 학습 비용과 추론 속도는 무엇인가?

주요 결과

  • 한 단계 InstaFlow는 SD급 이미지 품질을 달성하며 MS COCO 2017-5k에서 FID 23.3으로, 진행 증류(37.2→23.3)를 능가한다.
  • 확장된 1.7B 매개변수 네트워크를 사용하면 MS COCO 2017-5k에서 이미지당 0.09초에 FID 22.4를 달성한다.
  • MS COCO 2014-30k에서 InstaFlow는 0.09초에 FID 13.1를 달성하여 StyleGAN-T(0.1초에 13.9)를 능가한다.
  • InstaFlow 학습 비용은 199 A100 GPU 일로 SD나 GAN 기반 대비 상당히 낮다.
  • Reflow는 필수적이다: SD로부터의 직접 증류는 실패하는 반면, 2-Rectified Flow는 효과적인 증류와 고품질의 한 단계 결과를 가능하게 한다.
  • 이 파이프라인은 텍스트 조건부 reflow와 증류를 지원하며 순수 지도 학습과 경쟁력 있는 결과를 달성한다.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.