ADI-Stable-Diffusion  by Windsander

CLI tool for Stable Diffusion inference acceleration

Created 1 year ago
445 stars

Top 67.5% on SourcePulse

GitHubView on GitHub
Project Summary

Agile Diffusers Inference (ADI) is a C++ library and CLI tool designed to accelerate Stable Diffusion inference by leveraging ONNXRuntime. It targets engineers and researchers needing efficient, cross-platform deployment of diffusion models, offering a smaller package size and high performance compared to Python-based solutions.

How It Works

ADI utilizes ONNXRuntime as its core inference engine, benefiting from its open-source nature, scalability, high performance, and broad cross-platform support (CPU, GPU, TPU). Models are converted to the .onnx format, enabling efficient execution across various hardware. The library provides a C++ framework for direct integration and a CLI for straightforward usage.

Quick Start & Requirements

  • CLI Installation:
    • macOS: brew tap windsander/adi-stable-diffusion && brew install adi
    • Windows: Download .nupkg from releases and install via choco install adi.1.0.1.nupkg -y.
  • Build Locally: Use ./auto_build.sh with platform-specific parameters. Advanced options allow enabling CUDA, TensorRT, and custom compiler configurations.
  • Prerequisites: Building locally may require CMake and Ninja. GPU acceleration requires appropriate drivers and CUDA/TensorRT installations.
  • Documentation: ADI-Stable-Diffusion Releases

Highlighted Details

  • Supports Stable Diffusion v1.0-v1.5 and Turbo models, with ongoing development for v2.x, v3.x, SDXL, and SVD.
  • Implements multiple schedulers (Euler, Euler Ancestral, DDIM, DDPM, etc.) and tokenizer types (BPE, Word Piece).
  • Offers build-time options for ONNXRuntime providers including CUDA, TensorRT, CoreML, and NNAPI.
  • Provides a comprehensive CLI for various inference tasks like img2img.

Maintenance & Community

The project is maintained by Windsander. Community channels are not explicitly mentioned in the README.

Licensing & Compatibility

The project is licensed under the MIT License, permitting commercial use and integration with closed-source applications.

Limitations & Caveats

Support for SD v2.x, v3.x, SDXL, and SVD is listed as under development or experimental. Some scheduler implementations are marked as tested, implying others may not be fully validated. The README suggests manual preparation of ONNX models and converters.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
0 stars in the last 30 days

Explore Similar Projects

Starred by Chaoyu Yang Chaoyu Yang(Founder of Bento), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
3 more.

nunchaku by nunchaku-tech

1.9%
3k
High-performance 4-bit diffusion model inference engine
Created 10 months ago
Updated 2 days ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Luis Capelo Luis Capelo(Cofounder of Lightning AI), and
3 more.

LitServe by Lightning-AI

0.3%
4k
AI inference pipeline framework
Created 1 year ago
Updated 2 days ago
Feedback? Help us improve.