techlist.io

Consistency Models

3 posts

OpenAI2024-10-223 min readCurated summary

Simplifying, stabilizing, and scaling continuous-time consistency models

# Simplifying, Stabilizing, and Scaling Continuous-Time Consistency Models Diffusion models produce high-quality images, 3D models, audio, and video, but they need dozens to hundreds of sequential steps to sample. The authors introduce sCM, a simplified formulation of continuous-time consistency models that stabilizes training at large scale. A 1.5B-parameter sCM generates samples with quality comparable to leading diffusion models in just two steps, roughly a 50x wall-clock speedup. ## Why Diffusion Sampling Is Slow - Diffusion models generate samples through a long sequence of denoising steps, which limits efficiency for real-time use. - Existing distillation methods can speed up sampling, but they often bring high compute costs, complex training, or reduced sample quality. ## The sCM Approach - The authors simplify the theoretical formulation of continuous-time consistency models and further stabilize their training. - This enabled scaling to 1.5 billion parameters on ImageNet at 512×512 resolution, which the authors describe as unprecedented for continuous-time consistency models. - Consistency models aim to map noise directly to a clean sample in one step, rather than following the gradual path of a diffusion model. - sCM distills knowledge from a pre-trained diffusion model (the "teacher"). ## Performance and Scaling Behavior - The largest model generates a single sample in 0.11 seconds on one A100 GPU, with no inference optimization. - Evaluation uses Fréchet Inception Distance (FID), where lower is better, and effective sampling compute, which estimates total compute per sample. - Two-step sCM samples achieve FID scores within 10% (relative) of the teacher diffusion model, which needs hundreds of steps, while using less than 10% of its effective sampling compute. - The relative FID gap stays consistent across several orders of magnitude of model size, so the absolute quality gap shrinks as models scale. - Adding sampling steps further reduces the quality gap. ## Limitations - The best sCMs still depend on pre-trained diffusion models for initialization and distillation, leaving a small but consistent quality gap versus the teacher. - FID is an imperfect proxy for sample quality, so close FID scores don't always mean close visual quality. Evaluation may need to vary by application. ## Conclusion sCM makes continuous-time consistency models practical at large scale, offering diffusion-level sample quality with two sampling steps. The authors plan to keep improving inference speed and sample quality for real-time generative AI across image, audio, and video. For applications where latency matters, a two-step consistency model is a strong alternative to a full diffusion sampler, though teams should validate quality beyond FID.

OpenAI2024-06-192 min readCurated summary

Consistency Models

Consistency models address the slow sampling of diffusion models by mapping noise directly to data, which allows high-quality generation in one step. They also allow multistep sampling for better quality and support zero-shot editing tasks without task-specific training. The authors report state-of-the-art one-step results and show that the models can work as standalone generative models that outperform existing one-step, non-adversarial methods. ## The Bottleneck in Diffusion Models - Diffusion models produce strong results in image, audio, and video generation. - Their iterative sampling process makes generation slow. ## Direct Noise-to-Data Mapping - Consistency models generate samples by mapping noise directly to data. - One-step generation is built into the design. - Multistep sampling remains possible, letting users trade compute for sample quality. ## Zero-Shot Data Editing - The models handle tasks such as image inpainting, colorization, and super-resolution. - They do not need explicit training on these tasks. ## Training Approaches - They can be trained by distilling a pre-trained diffusion model. - They can also be trained as standalone generative models. ## Benchmark Results - In one- and few-step sampling, they outperform existing diffusion distillation techniques. - One-step generation reaches a new state-of-the-art FID of 3.55 on CIFAR-10 and 6.20 on ImageNet 64x64. - As standalone models, they outperform existing one-step, non-adversarial generative models on CIFAR-10, ImageNet 64x64, and LSUN 256x256.

OpenAI2024-06-192 min readCurated summary

Improved Techniques for Training Consistency Models

Consistency models can generate high-quality samples in a single step without adversarial training, but current versions rely on distillation from pre-trained diffusion models and on learned metrics like LPIPS, which limit their quality and bias evaluation. This work presents improved techniques for consistency training, in which models learn directly from data without distillation. With these changes, the models reach FID scores that beat distillation-based results in both one-step and two-step sampling. ### Limits of Distillation and LPIPS - Distillation caps a consistency model's quality at that of the pre-trained diffusion model it learns from. - LPIPS, a learned perceptual metric, introduces undesirable bias into evaluation. ### Improved Consistency Training - The authors analyze the theory of consistency training and find a previously overlooked flaw. They fix it by removing the Exponential Moving Average from the teacher consistency model. - Pseudo-Huber losses from robust statistics replace learned metrics such as LPIPS. - A lognormal noise schedule is introduced for the consistency training objective. - The total number of discretization steps doubles every set number of training iterations. - Better hyperparameter tuning is applied alongside these modifications. ### Results on CIFAR-10 and ImageNet 64×64 - One-step sampling achieves FID scores of 2.51 on CIFAR-10 and 3.25 on ImageNet 64×64. - These one-step scores are 3.5× and 4× better than prior consistency training approaches. - Two-step sampling lowers the FID scores to 2.24 on CIFAR-10 and 2.77 on ImageNet 64×64. - The two-step results surpass distillation-based results in both one-step and two-step settings. - The gap between consistency models and other state-of-the-art generative models narrows.