fastsdcpu  by rupeshs

CPU-based Stable Diffusion for fast image generation

created 1 year ago
1,755 stars

Top 25.0% on sourcepulse

GitHubView on GitHub
Project Summary

FastSD CPU offers a significantly accelerated Stable Diffusion experience on consumer hardware, targeting users who want to run advanced AI image generation locally without requiring powerful GPUs. It leverages Latent Consistency Models (LCM) and Adversarial Diffusion Distillation (ADD) to achieve rapid inference times, with multiple interface options including a desktop GUI, WebUI, and CLI.

How It Works

The project achieves its speed by integrating Latent Consistency Models (LCM) and Adversarial Diffusion Distillation (ADD), which allow for fewer inference steps. A key enabler is its robust OpenVINO support, optimizing models for Intel CPUs, integrated GPUs, and NPUs. This approach bypasses the need for dedicated high-end GPUs, making advanced diffusion models accessible on a wider range of hardware.

Quick Start & Requirements

  • Install: Clone the repository and run install.bat (Windows), ./install.sh (Linux), or ./install-mac.sh (Mac).
  • Prerequisites: Python 3.10+ and uv package manager. OpenVINO is recommended for optimal performance.
  • Resources: Minimum RAM varies by model: 2GB for LCM, 4GB for LCM-LoRA, and 11GB for OpenVINO models (reducible with Tiny Auto Encoder).
  • Docs: Installation Guide, WebUI Screenshot

Highlighted Details

  • Achieves 0.82-second image generation (512x512) on a Core i7-12700 using OpenVINO with SDXS-512-0.9.
  • Supports multiple interfaces: Desktop GUI, WebUI (with Lora, ControlNet), and CLI.
  • Offers real-time text-to-image generation (experimental).
  • Integrates with Intel AI PC features, including NPU acceleration for Meteor Lake and Lunar Lake processors.
  • Supports GGUF models via a stable-diffusion.cpp shared library.

Maintenance & Community

  • Actively updated with new features and model support (e.g., SANA Sprint, Tiny AutoEncoder, Intel Lunar Lake NPU).
  • Community support channels are not explicitly listed, but contributions are acknowledged.

Licensing & Compatibility

  • MIT License.
  • Permissive for commercial use and integration with closed-source applications.

Limitations & Caveats

  • Real-time text-to-image is experimental.
  • OpenVINO is not supported on Mac M1/M2/M3 chips (works on Intel Macs).
  • Tiny Auto Encoder may not function in NPU mode.
Health Check
Last commit

3 weeks ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
2
Star History
85 stars in the last 90 days

Explore Similar Projects

Starred by Patrick von Platen Patrick von Platen(Core Contributor to Hugging Face Transformers and Diffusers), Michael Han Michael Han(Cofounder of Unsloth), and
1 more.

ktransformers by kvcache-ai

0.4%
15k
Framework for LLM inference optimization experimentation
created 1 year ago
updated 3 days ago
Starred by George Hotz George Hotz(Author of tinygrad; Founder of the tiny corp, comma.ai), Anton Bukov Anton Bukov(Cofounder of 1inch Network), and
16 more.

tinygrad by tinygrad

0.1%
30k
Minimalist deep learning framework for education and exploration
created 4 years ago
updated 1 day ago
Feedback? Help us improve.