DeepCache  by horseee

Training-free acceleration for diffusion models

created 1 year ago
910 stars

Top 40.8% on sourcepulse

GitHubView on GitHub
Project Summary

DeepCache offers a training-free, near-lossless method to accelerate diffusion models by reusing high-level U-Net features. It targets researchers and practitioners working with Stable Diffusion, Stable Diffusion XL, Stable Video Diffusion, and DDPM, providing significant speedups with minimal impact on output quality.

How It Works

DeepCache leverages the inherent properties of the U-Net architecture in diffusion models. It intelligently caches and reuses intermediate high-level features across diffusion steps, while only updating the lower-level features. This selective updating significantly reduces computational load without requiring model retraining, leading to faster inference times.

Quick Start & Requirements

Highlighted Details

  • Achieves 2.3x acceleration on Stable Diffusion v1.5 with a 0.05 CLIP Score decline.
  • Accelerates Stable Diffusion XL by 2.6x.
  • Supports Stable Diffusion, SDXL, SVD, DDPM, DDIM, PLMS, and various pipeline variants (Img2Img, Inpainting).
  • Plug-and-play implementation available, requiring no modification to existing Diffusers code.

Maintenance & Community

  • Active development with recent updates including AsyncDiff and Learning-to-Cache.
  • Integrations and plugins available for Diffusers, OneDiff, ComfyUI, WebUI, SD.Next, and MLX for M1 Macs.
  • Paper published at CVPR 2024.

Licensing & Compatibility

  • The repository does not explicitly state a license. However, the inclusion of a BibTeX entry suggests academic use. Compatibility with commercial or closed-source projects is not specified.

Limitations & Caveats

  • While the plug-and-play implementation is general, older experimental code might be sensitive to Diffusers updates. The exact performance gains and quality impact can vary depending on the specific model and parameters used.
Health Check
Last commit

1 year ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.