consistency_models  by openai

PyTorch code for consistency models research paper

Created 2 years ago
6,432 stars

Top 7.9% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides the official codebase for Consistency Models, a novel approach to generative modeling that enables fast, high-quality image synthesis. It is designed for researchers and practitioners in deep learning and computer vision interested in state-of-the-art generative models. The primary benefit is significantly accelerated sampling times compared to traditional diffusion models, with single-step generation capabilities.

How It Works

Consistency Models achieve fast sampling by distilling knowledge from pre-trained diffusion models into a single, compact model. This is accomplished through a process called "consistency distillation," where the student model learns to map any point on a diffusion trajectory to the origin in a single step. This approach allows for rapid generation without sacrificing image quality, a significant advantage over multi-step sampling methods.

Quick Start & Requirements

  • Install: pip install -e . or via Docker (cd docker && make build && make run).
  • Prerequisites: PyTorch, Python. GPU with CUDA is recommended for performance.
  • Pre-trained models are available for ImageNet-64, LSUN Bedroom-256, and LSUN Cat-256.
  • Official documentation and examples are available within the repository.

Highlighted Details

  • Enables single-step and multi-step sampling for image generation.
  • Supports consistency distillation, consistency training, and editing algorithms.
  • Integrated into Hugging Face's diffusers library via ConsistencyModelPipeline.
  • Achieves fast inference, with potential further speedups using torch.compile().

Maintenance & Community

This project is an official OpenAI release. Further details on community engagement or ongoing maintenance are not explicitly detailed in the README.

Licensing & Compatibility

The codebase is based on openai/guided-diffusion, which was initially released under the MIT license. The specific license for this repository is not explicitly stated but is implied to be permissive.

Limitations & Caveats

The repository focuses on PyTorch implementations; a separate JAX version exists for CIFAR-10 experiments. Model cards should be reviewed for specific intended uses and limitations of pre-trained checkpoints.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
25 stars in the last 30 days

Explore Similar Projects

Starred by Lilian Weng Lilian Weng(Cofounder of Thinking Machines Lab), Patrick Kidger Patrick Kidger(Core Contributor to JAX ecosystem), and
12 more.

glow by openai

0.0%
3k
Generative flow research paper code
Created 7 years ago
Updated 1 year ago
Feedback? Help us improve.