Diffusion model(SD,Flux,Wan,Qwen Image,Z-Image,...) inference in pure C/C++
6,921
stars
836
commits
C++
primary language
Sep 6, 2026
updated
Diffusion model(SD,Flux,Wan,...) inference in pure C/C++
Note that this project is under active development.
API and command-line option may change frequently.
.ckpt or .pth or .pt).safetensors).gguf).gguf or .safetensorsEuler AEulerHeunDPM2DPM++ 2MDPM++ 2M v2DPM++ 2S aER-SDELCM--rng cuda, default, consistent with the stable-diffusion-webui GPU RNG--rng cpu, consistent with the comfyui RNGdownload weights(.ckpt or .safetensors or .gguf). For example
curl -L -O https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors
./bin/sd-cli -m ../models/v1-5-pruned-emaonly.safetensors -p "a lovely cat"
For detailed command-line arguments, check out cli doc.
If you want to improve performance or reduce VRAM/RAM usage, please refer to performance guide. For runtime and parameter backend placement, see the backend selection guide.
These projects wrap stable-diffusion.cpp for easier use in other languages/frameworks.
These projects use stable-diffusion.cpp as a backend for their image generation.
Thank you to all the people who have already contributed to stable-diffusion.cpp!
C++
100.0%
Diffusion model(SD,Flux,Wan,Qwen Image,Z-Image,...) inference in pure C/C++
6,921
stars
836
commits
C++
primary language
Sep 6, 2026
updated
Diffusion model(SD,Flux,Wan,...) inference in pure C/C++
Note that this project is under active development.
API and command-line option may change frequently.
.ckpt or .pth or .pt).safetensors).gguf).gguf or .safetensorsEuler AEulerHeunDPM2DPM++ 2MDPM++ 2M v2DPM++ 2S aER-SDELCM--rng cuda, default, consistent with the stable-diffusion-webui GPU RNG--rng cpu, consistent with the comfyui RNGdownload weights(.ckpt or .safetensors or .gguf). For example
curl -L -O https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors
./bin/sd-cli -m ../models/v1-5-pruned-emaonly.safetensors -p "a lovely cat"
For detailed command-line arguments, check out cli doc.
If you want to improve performance or reduce VRAM/RAM usage, please refer to performance guide. For runtime and parameter backend placement, see the backend selection guide.
These projects wrap stable-diffusion.cpp for easier use in other languages/frameworks.
These projects use stable-diffusion.cpp as a backend for their image generation.
Thank you to all the people who have already contributed to stable-diffusion.cpp!
C++
100.0%