leejet/stable-diffusion.cpp

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

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 8 minutes ago
Added to GitGenius on December 13th, 2025
Created on August 13th, 2023
Open Issues & Pull Requests: 227 (+0)
Number of forks: 694
Total Stargazers: 6,500 (+0)
Total Subscribers: 73 (+0)

Issue Activity (beta)

Open issues: 353
New in 7 days: 5
Closed in 7 days: 5
Avg open age: 299 days
Stale 30+ days: 329
Stale 90+ days: 281

Recent activity

Opened in 7 days: 3
Closed in 7 days: 3
Comments in 7 days: 2
Events in 7 days: 10

Top labels

  • bug (152)
  • enhancement (94)
  • fixed (1)

Repository Insights (GitGenius)

Median issue/PR response: 0.4 hours
Mean response time: 37.7 days
90th percentile: 31.1 days
Tracked items: 692

Most active contributors

Detailed Description

The stable-diffusion.cpp repository is a C++ implementation of diffusion model inference that enables running image and video generation models entirely in pure C/C++ without external dependencies. Built on the GGML framework in the same manner as llama.cpp, the project provides lightweight, efficient inference for a comprehensive range of diffusion models including Stable Diffusion variants, FLUX models, Qwen Image, Z-Image, Wan video models, and numerous other cutting-edge generative AI architectures.

The repository supports an extensive catalog of image generation models spanning multiple generations and architectures. For text-to-image generation, it includes SD1.x, SD2.x, SD-Turbo, SDXL, SDXL-Turbo, SD3/SD3.5, FLUX.1 and FLUX.2 variants, Lens, Chroma, Qwen Image, PiD, LongCat Image, Z-Image, MiniT2I, Ovis-Image, Anima, ERNIE-Image, Boogu Image, Krea2, SeFi-Image, HiDream-O1-Image, and Ideogram4. For image editing tasks, it supports FLUX.1-Kontext-dev, Qwen Image Edit series, LongCat Image Edit, and Boogu Image Edit. Video generation capabilities include Wan2.1/Wan2.2 and LTX-2.3 models. The project also supports PhotoMaker for identity preservation, ControlNet with SD 1.5, LoRA weights, and Latent Consistency Models for faster inference.

The implementation provides multiple backend options for different hardware configurations, including CPU with AVX/AVX2/AVX512 support for x86 architectures, CUDA, Vulkan, Metal, OpenCL, and SYCL. It supports various weight formats including PyTorch checkpoints, Safetensors, and GGUF, with conversion capabilities between formats. The codebase includes optimization features such as Flash Attention for memory efficiency, VAE tiling for reduced memory usage, and faster latent decoding with TAESD. Multiple sampling methods are implemented including Euler A, Euler, Heun, DPM variants, and LCM sampling.

According to GitGenius activity tracking, the repository demonstrates active development with a median issue and pull request response latency of 0.4 hours across 653 tracked items, though the mean latency is 1001.2 hours indicating occasional longer-term discussions. The most active contributor is leejet with 363 tracked events, followed by stduhpf with 357 events and wbruna with 241 events. Bug reports represent the most common issue label with 148 instances, followed by enhancement requests with 93 instances. The project maintains cross-platform support for Linux, macOS, Windows, and Android via Termux, with an embedded web UI for user interaction.

The repository has attracted significant ecosystem development, with multiple language bindings available for Golang, C#, Python, and Rust, as well as numerous UI implementations including Jellybox, Local Diffusion, sd.cpp-webui, LocalAI, and KoboldCpp that use stable-diffusion.cpp as their inference backend. The project explicitly notes it remains under active development with APIs and command-line options subject to frequent changes.

stable-diffusion.cpp
by
leejetleejet/stable-diffusion.cpp

Repository Details

Fetching additional details & charts...