fastsdcpu  by rupeshs

CPU-based Stable Diffusion for fast image generation

Created 2 years ago
2,118 stars

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

6 days ago

Responsiveness

1 day

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

Explore Similar Projects

Starred by Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research), comfyanonymous comfyanonymous(Author of ComfyUI; Cofounder of Comfy Org), and
26 more.

ComfyUI by Comfy-Org

0.8%
120k
Visual AI engine for diffusion models, API, and backend
Created 3 years ago
Updated 19 hours ago
Feedback? Help us improve.