Go to file
2026-04-15 23:17:47 +08:00
.github feat: use sdcpp-webui as embedded webui (#1408) 2026-04-11 18:33:11 +08:00
assets docs: add anima docs 2026-03-01 15:32:25 +08:00
docs feat: add flux2 small decoder support (#1402) 2026-04-08 23:13:25 +08:00
examples chore: allow building the embedded UI header separately (#1415) 2026-04-15 22:07:31 +08:00
ggml@404fcb9d7c sync: update ggml 2026-03-30 23:00:53 +08:00
include sync: update ggml 2026-03-30 23:00:53 +08:00
script refactor: reorganize the file structure (#1266) 2026-02-10 23:13:35 +08:00
src feat: add left padding support to tokenizers (#1424) 2026-04-15 23:17:47 +08:00
thirdparty feat: add webm support (#1391) 2026-04-06 01:49:28 +08:00
.clang-format style: format code 2024-01-29 23:05:18 +08:00
.clang-tidy chore: add .clang-tidy configuration and apply modernize checks (#902) 2025-10-18 23:23:40 +08:00
.dockerignore chore: add Linux Vulkan build and Docker image workflows (#1164) 2026-01-05 23:42:12 +08:00
.gitignore feat: add image preview support (#522) 2025-11-10 00:12:02 +08:00
.gitmodules feat: use sdcpp-webui as embedded webui (#1408) 2026-04-11 18:33:11 +08:00
CMakeLists.txt refactor: introduce shared tokenizer abstraction and split implementations (#1423) 2026-04-15 22:44:39 +08:00
Dockerfile chore: add Linux Vulkan build and Docker image workflows (#1164) 2026-01-05 23:42:12 +08:00
Dockerfile.cuda ci: avoid cuda docker build timeout by using -j16 2026-03-15 18:39:29 +08:00
Dockerfile.musa chore: downgrade ubuntu base image in musa container image (#1176) 2026-01-05 23:56:34 +08:00
Dockerfile.sycl chore: add Linux Vulkan build and Docker image workflows (#1164) 2026-01-05 23:42:12 +08:00
Dockerfile.vulkan chore: add Linux Vulkan build and Docker image workflows (#1164) 2026-01-05 23:42:12 +08:00
format-code.sh refactor: introduce shared tokenizer abstraction and split implementations (#1423) 2026-04-15 22:44:39 +08:00
LICENSE Initial commit 2023-08-13 16:00:22 +08:00
README.md docs: update readme 2026-04-11 18:42:38 +08:00

stable-diffusion.cpp

leejet%2Fstable-diffusion.cpp | Trendshift

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/04/11 🚀 stable-diffusion.cpp now uses a brand-new embedded web UI.
    👉 Details: PR #1408

  • 2026/01/18 🚀 stable-diffusion.cpp now supports FLUX.2-klein
    👉 Details: PR #1193

  • 2025/12/01 🚀 stable-diffusion.cpp now supports Z-Image
    👉 Details: PR #1020

  • 2025/11/30 🚀 stable-diffusion.cpp now supports FLUX.2-dev
    👉 Details: PR #1016

  • 2025/10/13 🚀 stable-diffusion.cpp now supports Qwen-Image-Edit / Qwen-Image-Edit 2509
    👉 Details: PR #877

  • 2025/10/12 🚀 stable-diffusion.cpp now supports Qwen-Image
    👉 Details: PR #851

  • 2025/09/14 🚀 stable-diffusion.cpp now supports Wan2.1 Vace
    👉 Details: PR #819

  • 2025/09/06 🚀 stable-diffusion.cpp now supports Wan2.1 / Wan2.2
    👉 Details: PR #778

Features

Quick Start

Get the sd executable

Download model weights

Generate an image with just one command

./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.

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