stable-diffusion.cpp

A C/C++ engine, in the style of llama.cpp, that runs image and video diffusion models such as FLUX, Qwen-Image, Z-Image and Wan.

  • Run locally
  • MIT · Open source
  • macOS, Windows, Linux
  • Verified

stable-diffusion.cpp is a C/C++ implementation of diffusion-model inference built on ggml, the library behind llama.cpp. It is lightweight and has no external dependencies. The README lists image models from Stable Diffusion 1.x and SD3.5 to FLUX.1, FLUX.2 and FLUX.3 Image Klein, Qwen-Image and Z-Image, and video models such as Wan 2.1 and 2.2 and LTX-2.5. Its news list shows day-0 support for MiniMax-H3-Image on 11 November 2026 and day-1 support for MiniMax-H3 in August.

Prebuilt binaries exist for Windows (CPU, CUDA 12, Vulkan and ROCm builds), Linux (CPU, Vulkan and ROCm builds) and macOS on Apple Silicon. In April 2026 it gained a new embedded web UI. The project itself says it is under active development, so the API and command-line options may change often.

The license is MIT. The documentation has one page per supported model family, and the image and video models are large, so check the memory table on each model page before you download weights.

Good for

  • Running FLUX, Qwen-Image, Z-Image or Wan locally without a Python environment
  • Apple Silicon, NVIDIA, AMD or Vulkan-capable GPUs through the matching build
  • Adding image generation to a C or C++ application

Watch out for

  • The README says the API and command-line options may change frequently
  • It supports a fixed list of model families, so check the docs for your model
  • Image and video models are large, so check the memory needs on the model page first

Links