Skip to main content
QUICK REVIEW

[Paper Review] Latent Consistency Models: Synthesizing High-Resolution Images with Few-Step Inference

Simian Luo, Yiqin Tan|ArXiv.org|Oct 6, 2023
Generative Adversarial Networks and Image SynthesisComputer Science37 citations
TL;DR

LCMs distill pre-trained latent diffusion models into a latent consistency model to enable fast few-step (even 1-step) high-resolution image generation with classifier-free guidance, plus a fine-tuning method for customization.

ABSTRACT

Latent Diffusion models (LDMs) have achieved remarkable results in synthesizing high-resolution images. However, the iterative sampling process is computationally intensive and leads to slow generation. Inspired by Consistency Models (song et al.), we propose Latent Consistency Models (LCMs), enabling swift inference with minimal steps on any pre-trained LDMs, including Stable Diffusion (rombach et al). Viewing the guided reverse diffusion process as solving an augmented probability flow ODE (PF-ODE), LCMs are designed to directly predict the solution of such ODE in latent space, mitigating the need for numerous iterations and allowing rapid, high-fidelity sampling. Efficiently distilled from pre-trained classifier-free guided diffusion models, a high-quality 768 x 768 2~4-step LCM takes only 32 A100 GPU hours for training. Furthermore, we introduce Latent Consistency Fine-tuning (LCF), a novel method that is tailored for fine-tuning LCMs on customized image datasets. Evaluation on the LAION-5B-Aesthetics dataset demonstrates that LCMs achieve state-of-the-art text-to-image generation performance with few-step inference. Project Page: https://latent-consistency-models.github.io/

Motivation & Objective

  • Motivate fast, high-resolution image synthesis with diffusion models without heavy multi-step sampling.
  • Leverage consistency models in the latent space of a pre-trained autoencoder (Stable Diffusion) to achieve few-step inference.
  • Introduce an efficient one-stage guided distillation method integrating classifier-free guidance.
  • Propose Latent Consistency Fine-tuning to adapt LCMs to customized datasets while preserving fast inference.

Proposed method

  • Formulate Latent Consistency Distillation (LCD) to distill a pre-trained SD into a latent consistency model in latent space.
  • Define a consistency function f_theta that directly predicts the x0 solution of the PF-ODE in latent space (z_t) and express it as f_theta(z,c,t)=c_skip(t) z + c_out(t) F_theta(z,c,t).
  • Incorporate classifier-free guidance by solving an augmented PF-ODE with CFG, enabling 2–4 step or 1-step sampling in latent space.
  • Use skipping-step technique (k) to accelerate convergence by enforcing consistency from t_{n+k} to t_n rather than from t_{n+1} to t_n, with k typically set to 20.
  • Train with a one-stage guided distillation objective that aligns the student CM with an EMA teacher via a consistency loss that compares f_theta at t_{n+k} and the EMA of f_theta estimated from z_{t_n}.
  • Propose Latent Consistency Fine-tuning (LCF) to adapt a pretrained LCM to customized datasets without training a new teacher diffusion model.

Experimental results

Research questions

  • RQ1Can latent consistency models enable high-quality, few-step (2–4, even 1) text-to-image generation on pre-trained latent diffusion models like Stable Diffusion?
  • RQ2Does one-stage guided distillation effectively incorporate classifier-free guidance and maintain fidelity with drastically reduced sampling steps?
  • RQ3Is skipping-step distillation (t_{n+k} to t_n) crucial for rapid convergence and high-quality outputs?
  • RQ4Can Latent Consistency Fine-tuning enable efficient adaptation of LCMs to customized datasets while preserving fast inference?

Key findings

  • LCMs achieve state-of-the-art text-to-image generation in few-step regimes (2–4 steps) on LAION-5B-Aesthetics, outperforming baselines at 512×512 and 768×768 resolutions.
  • Training with LCD requires about 32 A100 GPU hours for 2–4 step sampling, significantly less than prior two-stage guided distillation methods.
  • Incorporating CFG via augmented PF-ODE and one-stage distillation yields high-quality images with larger CFG scales, while maintaining efficient sampling.
  • Skipping-step technique (k around 20) accelerates convergence across multiple ODE solvers (DDIM, DPM, DPM++) with minimal loss in quality.
  • LCF enables efficient fine-tuning on customized datasets (e.g., Pokemon, Simpsons) to generate styles in few steps without retraining a teacher model.
  • Empirical results show LCMs outperform DDIM, DPM, DPM++, and Guided-Distill baselines in 1–4 step ranges, with comparable or better CLIP/FID metrics.

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.