Run This Ai
EN DE

stable-diffusion.cpp

Diffusion model inference (SD, Flux, Wan, Qwen Image, Z-Image) in pure C/C++ on ggml. Runs on CPU or GPU without Python or PyTorch.

★ 6,859 GitHub MIT stable-diffusionfluxggmlc++image-generationcpu-inference Image & Video

Overview

stable-diffusion.cpp is a lightweight, dependency-free inference engine for diffusion models such as Stable Diffusion, FLUX, Wan, Qwen Image and Z-Image, built in pure C/C++ on top of the ggml tensor library. It ships as a single native binary with no Python or PyTorch runtime, supports CPU, CUDA, Vulkan, Metal, SYCL and MUSA backends, and offers quantized GGUF model support, SD 1.5/2.x/SDXL/SD3.5, img2img, ControlNet, LCM and LoRA. Ideal for edge devices, servers and containers where a minimal footprint and fast startup matter.

Requirements

Min vCPU
2
Min RAM
4096 MB
Min Disk
10 GB
Rec vCPU
4
Rec RAM
8192 MB
Rec Disk
20 GB

Recommended VPS

Hostinger · KVM 4

4 vCPU · 16384 MB · 200 GB

$11.99
View plan

Hostinger · KVM 4

4 vCPU · 16384 MB · 200 GB

$11.99
View plan

Hostinger · KVM 8

8 vCPU · 32256 MB · 400 GB

$20.00
View plan

Affiliate disclosure

Docker Compose

# Generated by Run This Ai — docker-compose.yml
services:
  stable-diffusion-cpp:
    image: guaricema/stable-diffusion.cpp
    restart: unless-stopped
    ports:
      - 8080:8080
    volumes:
      - ./data/stable-diffusion-cpp:/data

Best VPS for stable-diffusion.cpp →

Related tools

Guides & articles