Gitpedia

Stable diffusion.cpp

Diffusion model(SD,Flux,Wan,Qwen Image,Z-Image,...) inference in pure C/C++

From leejetยทUpdated May 30, 2026ยทView on GitHubยท

**stable diffusion.cpp** is a Diffusion model(SD,Flux,Wan,Qwen Image,Z-Image,...) inference in pure C/C++ The project is written primarily in C++, distributed under the MIT License license, first published in 2023. It has gained significant community traction with 6,128 stars and 636 forks on GitHub. Key topics include: ai, cplusplus, diffusion, flux, flux-dev.

Latest release: master-660-d2797b8
<p align="center"> <img src="./assets/logo.png" width="360x"> </p>

stable-diffusion.cpp

<div align="center"> <a href="https://trendshift.io/repositories/9714" target="_blank"><img src="https://trendshift.io/api/badge/repositories/9714" alt="leejet%2Fstable-diffusion.cpp | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a> </div>

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.

๐Ÿ”ฅImportant News

  • 2026/05/27 ๐Ÿš€ stable-diffusion.cpp now supports Lens
  • 2026/05/17 ๐Ÿš€ stable-diffusion.cpp now supports LTX-2.3
  • 2026/04/11 ๐Ÿš€ stable-diffusion.cpp now uses a brand-new embedded web UI.
  • 2026/01/18 ๐Ÿš€ stable-diffusion.cpp now supports FLUX.2-klein
  • 2025/12/01 ๐Ÿš€ stable-diffusion.cpp now supports Z-Image
  • 2025/11/30 ๐Ÿš€ stable-diffusion.cpp now supports FLUX.2-dev
  • 2025/10/13 ๐Ÿš€ stable-diffusion.cpp now supports Qwen-Image-Edit / Qwen-Image-Edit 2509
  • 2025/10/12 ๐Ÿš€ stable-diffusion.cpp now supports Qwen-Image
  • 2025/09/14 ๐Ÿš€ stable-diffusion.cpp now supports Wan2.1 Vace
  • 2025/09/06 ๐Ÿš€ stable-diffusion.cpp now supports Wan2.1 / Wan2.2

Features

Quick Start

Get the sd executable

Download model weights

Generate an image with just one command

sh
./bin/sd-cli -m ../models/v1-5-pruned-emaonly.safetensors -p "a lovely cat"

For detailed command-line arguments, check out cli doc.

Performance

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.

Bindings

These projects wrap stable-diffusion.cpp for easier use in other languages/frameworks.

UIs

These projects use stable-diffusion.cpp as a backend for their image generation.

Contributors

Thank you to all the people who have already contributed to stable-diffusion.cpp!

Contributors

Star History

Star History Chart

References

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub โ†’

This article is auto-generated from leejet/stable-diffusion.cpp via the GitHub API.Last fetched: 5/31/2026