Tools/Diffusion Model Tools & UIs/stable-diffusion.cpp

stable-diffusion.cpp

Pure C/C++ diffusion model inference with GGUF quantization and no Python dependencies.

Open SourceSelf HostedOffline Capable
0.0 (0)

About

In the spirit of llama.cpp, stable-diffusion.cpp by leejet implements diffusion model inference in pure C/C++ on the ggml tensor library, with no Python runtime required. Coverage has grown far beyond Stable Diffusion 1.x, 2.x, and SDXL to include SD3 and 3.5, the FLUX family with Kontext editing, Qwen-Image, Z-Image, and video models such as Wan 2.1 and 2.2 and HunyuanVideo, plus LoRA and ControlNet support. Models load in GGUF quantized formats to shrink memory footprints, and compute backends span plain CPU with AVX, AVX2, and AVX512, CUDA, Vulkan, Metal, OpenCL, and SYCL, so the same approach works across NVIDIA, AMD, and Apple hardware or on CPU alone. Prebuilt binaries are published on the releases page, or the project builds from source following docs that cover backend selection, performance tuning, quantization, and per-model setup; a small embedded web UI arrived in 2026 alongside the command line interface. MIT licensed with about 6,600 stars and over 800 commits, it is the standard choice for diffusion inference in constrained or Python-free environments.

Should you use stable-diffusion.cpp?

Pick it when

Pick stable-diffusion.cpp when you need diffusion inference without a Python stack: embedding generation in a C/C++ app, shipping a prebuilt binary, or running GGUF models through Vulkan, SYCL, or on CPU-only machines.

Look elsewhere when

Skip it if you want a full creative UI with node workflows or an inpainting canvas, where ComfyUI or InvokeAI fit, or if you run FLUX on a recent NVIDIA card and want speed, where Nunchaku's 4-bit engine reports large gains.

Alternatives to stable-diffusion.cpp

  • ComfyUI-GGUF

    Uses the same kind of GGUF quantized files inside ComfyUI's node graph and custom node ecosystem, but brings a full Python and ComfyUI install along.

  • MFLUX

    MLX-native on Apple Silicon with LoRA, ControlNet, inpainting, and upscaling in a Python CLI, but Mac only where this runs on almost any hardware.

  • Nunchaku

    4-bit SVDQuant inference with reported large speedups on NVIDIA 20 to 50 series cards, but no CPU-only, AMD, or Apple path, and it needs Python.

  • Diffusers

    Python library of pretrained pipelines and composable schedulers for prototyping, the opposite trade: flexibility over a dependency-free binary.

Reviews (0)

Leave a Review

No reviews yet. Be the first to review!

Details

Price
Free
Platform
Local/Desktop
Difficulty
Easy (2/5)
License
MIT
Added
Jul 29, 2026

Tags