Windsander/ADI-Stable-Diffusion

Accelerate your Stable Diffusion inference with the library's universal C/C++ framework design, powered by ONNXRuntime & across platforms.

What it solves

Agile Diffusers Inference (ADI) provides a high-performance, lightweight C++ implementation for deploying Stable Diffusion models. It eliminates the need for Python at inference time, reducing package size and simplifying deployment across multiple platforms.

How it works

ADI leverages the ONNXRuntime engine to execute models in the .onnx format. It provides a C++ library and a command-line interface (CLI) that allows users to specify a scheduler, point to the necessary ONNX model files (text encoders, UNet/Transformer, VAE), and generate images or videos. It supports various precision policies (like auto-detecting RAM to use fp16) to optimize memory usage on constrained devices.

Who it’s for

Developers and engineers looking for a portable, Python-free C++ deployment solution for Stable Diffusion and related diffusion models on Windows, macOS, Linux, and Android.

Highlights

  • Zero Python Dependency: Pure C++17 implementation for inference.
  • Broad Model Support: Compatible with SD v1.5, SD v2.1, SDXL-turbo, SD3.5-turbo, FLUX.1-schnell, and SVD (image-to-video).
  • Cross-Platform: Targets nine different platform targets including Android, macOS (Apple Silicon), Windows, and Linux.
  • Extensive Sampler Library: Includes 14 discrete schedulers, Karras sigmas, and the rectified-flow family.
  • Hardware Acceleration: Supports ONNXRuntime providers such as CUDA, TensorRT, CoreML, and NNAPI.

Related

  • Project
  • Project
  • Project
  • Project
  • Project