consistency_models  by openai

PyTorch code for consistency models research paper

created 2 years ago
6,384 stars

Top 8.2% 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

1+ week

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

Explore Similar Projects

Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), Ross Taylor Ross Taylor(Cofounder of General Reasoning; Creator of Papers with Code), and
3 more.

pixel-cnn by openai

0.1%
2k
TensorFlow implementation for PixelCNN++ research paper
created 9 years ago
updated 5 years ago
Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), Patrick von Platen Patrick von Platen(Core Contributor to Hugging Face Transformers and Diffusers), and
3 more.

guided-diffusion by openai

0.2%
7k
Image synthesis codebase for diffusion models
created 4 years ago
updated 1 year ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Jiayi Pan Jiayi Pan(Author of SWE-Gym; AI Researcher at UC Berkeley), and
4 more.

taming-transformers by CompVis

0.1%
6k
Image synthesis research paper using transformers
created 4 years ago
updated 1 year ago
Feedback? Help us improve.