#77th of 30 in Image and video
stable-diffusion.cpp
C/C++ inference for Stable Diffusion, Flux, Qwen-Image and Wan video models
- Stars
- 7.7k
- License
- MIT
- Last commit
- Oct 2026
- Last release
- Oct 2026
- Language
- C++
5,574 on 1 Apr 20267,748 on 21 Oct 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
Runs diffusion models for image and video generation in plain C/C++ on top of ggml, the same way llama.cpp does for LLMs. It loads ckpt, safetensors and GGUF weights and runs on CPU, CUDA, Vulkan, Metal, OpenCL or SYCL. The main interface is the sd-cli command-line tool, and the README mentions an embedded web UI.
Who it is for: Developers and self-hosters running diffusion models locally without Python
Ranked among open-source alternatives to Midjourney (#7 of 10).
Strengths
- Backends: CPU (AVX/AVX2/AVX512), CUDA, Vulkan, Metal, OpenCL and SYCL
- Covers SD1.x to SDXL, SD3, FLUX, Qwen-Image, Z-Image, plus Wan and LTX video
- Reads .ckpt, .safetensors and .gguf; convert mode writes .gguf or .safetensors
- Flash attention, VAE tiling and TAESD cut memory use; bindings for Go, C#, Python, Rust
Weaknesses
- README warns API and command-line options may change frequently
- ControlNet support is stated only for SD 1.5
- Shorter sampler list than stable-diffusion-webui
- No node-graph UI in the README; separate projects supply GUIs
What it needs
- GPU optional
- Docker
- Models: SD1.x, SD2.x, SDXL, SD3/SD3.5, FLUX.1
Also in Image and video
See all 30| Rank | Project | Score |
|---|---|---|
| 1 | MoneyPrinterTurboTurns a topic into a short video with script, footage, voiceover and subtitles | 76 out of 100 |
| 2 | ComfyUINode-graph editor for running diffusion image, video, audio and 3D workflows | 75 out of 100 |
| 3 | toonflow-appInfinite-canvas tool for AI short drama and comic video production | 72 out of 100 |
| #4 | InvokeAIWeb UI for diffusion image generation with inpainting canvas and node workflows | 68 out of 100 |
| #5 | infinite-canvasBrowser-based infinite canvas for AI image and video generation | 66 out of 100 |