Skip to content

Latest commit

 

History

History
210 lines (178 loc) · 9.28 KB

File metadata and controls

210 lines (178 loc) · 9.28 KB
AIGC
ContentProducer ContentPropagator Label ProduceID PropagateID ReservedCode1 ReservedCode2
001191110102MAD55U9H0F10002
001191110102MAD55U9H0F10002
1
2cdeb6ee-14ee-430a-83e1-74638ca084d0
2cdeb6ee-14ee-430a-83e1-74638ca084d0
46b9dfd6-63bb-4d88-b995-0f54b87f4438
46b9dfd6-63bb-4d88-b995-0f54b87f4438

stable-diffusion.cpp

leejet%2Fstable-diffusion.cpp | Trendshift

Diffusion model(SD,Flux,Wan,...) inference in pure C/C++

Important

这是 CreatorCpp 定制版 fork — 引擎服务于 CreatorCpp 本地生图工作台(8GB 显存优化实践)。上游全部功能保留,可跟随上游更新。

相对上游的定制(详见下方说明):

  1. fp8_scaled per-tensor scale 修复 — 修复 nlohmann::json 字母序迭代导致 scale 恒为 1.0,以及 F8 原地覆盖产生 NaN 的两个连锁 bug
  2. Krea2 参考图 v3 API — sd_encode_image_prompt_v3(视觉塔 + 多参考图 + FA)、ref_images_strength per-image 强度、encode-only version 预设
  3. 显存管理 — ComfyUI 风格 host-offload 架构 + ggml 子模块定制(CreatorCpp-ggml,pinned memory cudaMemAdvise 零拷贝),8GB 显存跑 20B 级模型
  4. Krea2 flow_shift、diffusion-model-only TE/VAE 校验跳过

定制提交作者为 DoGeMisu(git log --author=DoGeMisu),完整上游历史保留便于合并。

Note that this project is under active development.
API and command-line option may change frequently.

🔥Important News

  • 2026/08/04 🚀 stable-diffusion.cpp adds Day-1 support for MiniMax-H3
  • 2026/06/25 🚀 stable-diffusion.cpp now supports Krea2
  • 2026/06/04 🚀 stable-diffusion.cpp now supports Ideogram4
  • 2026/05/31 🚀 stable-diffusion.cpp now supports PiD
  • 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

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

More Guides

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