S

stable-diffusion.cpp

SHA-256
7.7k stars·AI Productivity·SHA-256 checksum verified

A pure C/C++ engine that runs Stable Diffusion, FLUX, Qwen-Image and Wan video models locally — far lighter than ComfyUI, with no Python dependencies.

Run AI image and video generation locally with a single binary, no Python needed.

Core Features

  • Single dependency-free binary, no Python or CUDA toolkit setup required
  • Supports dozens of models: SD/SDXL/SD3, FLUX, Qwen-Image, Z-Image, Wan video and more
  • Runs on CPU, CUDA, Vulkan, Metal, OpenCL and SYCL
  • GGUF quantization, TAESD and VAE tiling for low-memory machines
  • LoRA, ControlNet, IP-Adapter, PhotoMaker and ESRGAN upscaling support

What It Can't Do

  • •It is a command-line tool with no official GUI (third-party UIs and a basic embedded web UI exist), so terminal familiarity helps. Model weights must be downloaded separately and are often several GB each. The project is under active development, so CLI options may change between versions. CPU-only generation is slow, and video models demand strong hardware. It performs inference only — you cannot train or fine-tune models with it.

Use Cases

  • Generate AI images locally on a CPU-only PC without a GPU, keeping data fully private
  • Embed image generation into your own apps via Python, Go, Rust, C# or Flutter bindings
  • Run quantized models on low-VRAM hardware for budget-friendly inference
  • Script reproducible, batch image or video generation pipelines

stable-diffusion.cpp is a pure C/C++ inference engine for diffusion models, built on ggml in the same spirit as llama.cpp. It supports dozens of image and video models including SD1.x/SDXL/SD3, FLUX.1/FLUX.2/FLUX.3, Qwen-Image, Z-Image, Wan2.x video, LTX, plus LoRA, ControlNet, IP-Adapter, PhotoMaker and ESRGAN upscaling. Its standout advantage over Python-based tools like ComfyUI and stable-diffusion-webui is footprint: a single dependency-free binary that runs on CPU (with AVX acceleration), CUDA, Vulkan, Metal, OpenCL or SYCL across Linux, macOS, Windows and even Android. GGUF quantization, TAESD fast decoding, VAE tiling and Flash Attention let it generate images on machines with limited VRAM or no GPU at all, making it ideal for local, private and embedded AI image generation.

Tags

stable-diffusionimage-generationcppgguflocal-aivideo-generation

Getting Started

1

Download installer

Click the button above to download the installer for your system

2

Install the software

Double-click the downloaded installer and follow the prompts

3

Download the prebuilt binary for your OS from the GitHub Releases page and extract it

4

Download model weights (e.g. an SD 1.5 .safetensors or .gguf file) from Hugging Face

5

Open a terminal and run ./bin/sd-cli -m /path/to/model -p "your prompt"

Install Guide
  1. Download the prebuilt binary for your OS from the GitHub Releases page and extract it
  2. Download model weights (e.g. an SD 1.5 .safetensors or .gguf file) from Hugging Face
  3. Open a terminal and run ./bin/sd-cli -m /path/to/model -p "your prompt"
File Integrity

SHA-256 checksum verified

Checksum extracted from GitHub official Release page

SHA256 Checksum

fe20366827d357c00797eebb58244dddab7fd9a348d70090c3871004c320f38d

This checksum is extracted from the GitHub Release page. Verify file integrity after download.

All SHA-256 checksums on this platform are extracted from the project's official GitHub Release page, without any modification. You can independently verify them on the GitHub Releases page.

Open Source Transparency

View GitHub Source
Environment Guide

Uninstall Info

The tool is fully portable — it writes no registry entries and installs no system components. Simply delete the extracted program folder and any downloaded model files to remove it completely.

No Extra Dependencies

Ready to use after download. No additional runtime required.

Project Info
LicenseMIT
Last Updated2026-10-26 18:06:33
GitHub RepositoryOfficial Website

Having issues? Check the FAQ below

5 FAQs

Similar Projects