leejet/stable-diffusion.cpp
Diffusion model(SD,Flux,Wan,Qwen Image,Z-Image,...) inference in pure C/C++
Recommended between 2025-12-06 and 2026-09-20. Last pushed 2026-11-01.
▲ 6 recommend · ▼ 0 criticisms
What hackers say
“It works out of the box.”
— peri-cl, 2026-09-20 · strong recommendation · original comment on Hacker News ↗
show original comment
I've set it up on my local machine just now, as my first local image diffuser. I can confirm it's very easy. I tried stable-diffusion.cpp, following its compile guide here[0], and its Qwen Image-2.1 specific instructions here[1]. It works out of the box. I made a test pelican[2]. It took 3 minutes on a CPU. [0] https://github.com/leejet/stable-diffusion.cpp/blob/master/docs/build.md [1] https://github.com/leejet/stable-diffusion.cpp/blob/master/docs/qwen_image_2.1.md [2] https://i.ibb.co/yMknC2K/output.png
“I am using sd.cpp, which is the cousin of llama.cpp”
— nkhgfugjk, 2026-09-20 · strong recommendation · original comment on Hacker News ↗
show original comment
I am using sd.cpp, which is the cousin of llama.cpp: https://github.com/leejet/stable-diffusion.cpp it already has day-0 qwen image 2.1 support!
“It is for people that know command line shells like bash or Powershell.”
— qclibre22, 2026-08-12 · original comment on Hacker News ↗
show original comment
There's also sdcpp ( https://github.com/leejet/stable-diffusion.cpp ) . It is for people that know command line shells like bash or Powershell. SDCPP is like llama.cpp but it is for using text to image AI models. Not everyone likes the node/graph programming interface in Comfy or a Webpage interface. Some people need these GUI/web interfaces and get lost and frustrated in shell scripting.
“FWIW stable-diffusion.cpp[0] (which implements a lot more than just stable diffusion, despite the name) is already a MIT licensed C++ library.”
— badsectoracula, 2026-01-18 · original comment on Hacker News ↗
show original comment
FWIW stable-diffusion.cpp[0] (which implements a lot more than just stable diffusion, despite the name) is already a MIT licensed C++ library. [0] https://github.com/leejet/stable-diffusion.cpp/
“Or you can try https://github.com/leejet/stable-diffusion.cpp”
— homarp, 2025-12-31 · original comment on Hacker News ↗
show original comment
Qwen released their updated Image model: https://huggingface.co/Qwen/Qwen-Image-2512 One way to run it is with ComfyUI https://www.comfy.org/ Or you can try https://github.com/leejet/stable-diffusion.cpp
“(Not tested) though apparently it already exists”
— opensandwich, 2025-12-06 · original comment on Hacker News ↗
show original comment
(Not tested) though apparently it already exists: https://github.com/leejet/stable-diffusion.cpp/wiki/How-to-Use-Z%E2%80%90Image-on-a-GPU-with-Only-4GB-VRAM
Badge for your README
[](https://hackerrepos.org/repo/leejet/stable-diffusion.cpp)