stable-diffusion.cpp
SHA-256A pure C/C++ engine that runs Stable Diffusion, FLUX, Qwen-Image and Wan video models locally — far lighter than ComfyUI, with no Python dependencies.
Smart Download
Download Download Version
vmaster-975-95b3090 · 537.3 MB
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
Getting Started
Install the software
Double-click the downloaded installer and follow the prompts
Download the prebuilt binary for your OS from the GitHub Releases page and extract it
Download model weights (e.g. an SD 1.5 .safetensors or .gguf file) from Hugging Face
Open a terminal and run ./bin/sd-cli -m /path/to/model -p "your prompt"
- Download the prebuilt binary for your OS from the GitHub Releases page and extract it
- Download model weights (e.g. an SD 1.5 .safetensors or .gguf file) from Hugging Face
- Open a terminal and run ./bin/sd-cli -m /path/to/model -p "your prompt"
SHA-256 checksum verified
Checksum extracted from GitHub official Release page
SHA256 Checksum
fe20366827d357c00797eebb58244dddab7fd9a348d70090c3871004c320f38dThis 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 SourceUninstall 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.
Having issues? Check the FAQ below
5 FAQs
Similar Projects
llama.cpp
High-performance LLM inference engine in C/C++ with minimal dependencies, supporting quantized models (1.5–8 bit) and diverse hardware (Apple Silicon, CUDA, Vulkan, etc.).
ollama
Ollama lets you download, run, and manage large language models locally. One command, multiple platforms, endless possibilities.
ComfyUI
ComfyUI is a modular AI engine with a node-based graph interface for generating images, video, 3D models, and audio. Unlike traditional webui tools, it gives pixel-level control over every model and parameter, making it the preferred choice for professionals.