What do you want to do?
3 use cases
-
Generate images locally with a single command
Download the sd binary and a model, then make images from a text prompt with no Python setup.
View prompt
Download the latest leejet/stable-diffusion.cpp release for my OS, fetch Stable Diffusion v1.5 weights and generate 4 images of <prompt> with sd-cli, each with a different seed. Save them to <folder> and list the exact commands you ran.
-
Run FLUX or Qwen Image on modest hardware with GGUF
Use GGUF quantized weights and the right backend so newer image models fit in limited memory.
View prompt
Help me run <FLUX or Qwen Image> with leejet/stable-diffusion.cpp on my <hardware>. Follow the model's docs page and the Quantization and GGUF guide to choose weights that fit in <memory>, then generate one test image of <prompt> and tell me the time and memory used.
-
Add local image generation to your own app
Use a Stable Diffusion CPP binding for Python, Go, Rust, C# or Flutter to generate images inside your program.
View prompt
Add local image generation to my <language> app using the stable-diffusion.cpp binding listed for it in the leejet/stable-diffusion.cpp README. Load <model weights>, expose a generate(prompt) function, and pin the library version.
Quick start with Stable Diffusion CPP
- Check you have what it needs: The sd executable from the releases page, or a build from source following the build guide; Model weights in .ckpt, .safetensors or .gguf format; Linux, macOS or Windows; Android works through Termux.
- Open leejet/stable-diffusion.cpp on GitHub and read the README and license.
- Download a pre-built sd binary from the releases page, or build it from source with the build guide
- Download weights, for example
curl -L -O https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors - Generate an image:
./bin/sd-cli -m ../models/v1-5-pruned-emaonly.safetensors -p "a lovely cat" - Check the cli doc for options such as negative prompt, sampling method and seed
These steps come from our top use case, Generate images locally with a single command, which also has a copy-paste agent prompt.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for leejet/stable-diffusion.cpp
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeAbout this repo
- Who it is forDevelopers and tinkerers who want local image and video generation without a Python stack or a heavy web UI.
- Why it is hot7.8k stars, talked about in 2 AI sources we track
- LanguageC++
- Sourcegithub.com/leejet/stable-diffusion.cpp ยท Back to Hot repos
Requirements
- The sd executable from the releases page, or a build from source following the build guide
- Model weights in .ckpt, .safetensors or .gguf format
- Linux, macOS or Windows; Android works through Termux
- Enough RAM or VRAM for the model; the performance guide covers reducing it
Add this badge to your README
Maintain Stable Diffusion CPP? Show readers where to find these use cases.
Markdown
[](https://dedupedai.com/use-cases/leejet-stable-diffusion-cpp/?utm_source=github&utm_medium=badge&utm_campaign=leejet-stable-diffusion.cpp)
HTML
<a href="https://dedupedai.com/use-cases/leejet-stable-diffusion-cpp/?utm_source=github&utm_medium=badge&utm_campaign=leejet-stable-diffusion.cpp"><img src="https://dedupedai.com/badge/leejet/stable-diffusion.cpp.svg" alt="Use cases on Deduped" height="20"></a>
A static image, no tracking script. About the badge
Questions about Stable Diffusion CPP
What is Stable Diffusion CPP?
stable-diffusion.cpp runs diffusion models for images and video in pure C/C++ on top of ggml, the same way llama.cpp runs language models. It supports SD 1.x, SDXL, SD3, FLUX, Qwen Image, Z-Image, Wan and LTX video and many more, with CPU, CUDA, Vulkan, Metal, OpenCL and SYCL backends, GGUF weights, LoRA, ControlNet and ESRGAN upscaling. It is an open-source project on GitHub: https://github.com/leejet/stable-diffusion.cpp.
How do I use Stable Diffusion CPP?
Download a pre-built sd binary from the releases page, or build it from source with the build guide; then download weights, for example curl -L -O https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors; generate an image: ./bin/sd-cli -m ../models/v1-5-pruned-emaonly.safetensors -p "a lovely cat". The use cases on this page give the full steps and a copy-paste agent prompt for each job.
Who is Stable Diffusion CPP for?
Developers and tinkerers who want local image and video generation without a Python stack or a heavy web UI.
What can I do with Stable Diffusion CPP?
3 use cases so far, for example: Generate images locally with a single command; Run FLUX or Qwen Image on modest hardware with GGUF; Add local image generation to your own app. Each has steps and a copy-paste agent prompt.
What do I need to run Stable Diffusion CPP?
The sd executable from the releases page, or a build from source following the build guide; Model weights in .ckpt, .safetensors or .gguf format; Linux, macOS or Windows; Android works through Termux; Enough RAM or VRAM for the model; the performance guide covers reducing it.
What are alternatives to Stable Diffusion CPP?
Other hot AI repos in Content: Voice Studio, Impeccable, Taste Skill, Kokoro, Chatterbox.
Is Stable Diffusion CPP safe to run?
Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.