axodox-machinelearning  by axodox

C++ library for ONNX-based offline AI model execution

Created 2 years ago
621 stars

Top 53.1% on SourcePulse

GitHubView on GitHub
Project Summary

This C++ library provides a pure C++ implementation of AI models like Stable Diffusion (1.5 and XL), ControlNet, Midas, HED, and OpenPose. It targets developers of real-time graphics applications and games, offering simplified deployment and integration by eliminating Python dependencies and running the entire generation process in a single executable.

How It Works

The library leverages ONNX models executed via the ONNX Runtime, supporting various execution providers like CUDA, TensorRT, and DirectML. This approach allows for cross-platform compatibility and hardware acceleration. It integrates feature extractors (OpenPose, MiDAS, HED) to guide Stable Diffusion generation via ControlNet, enabling precise control over output based on pose, depth, or edge maps.

Quick Start & Requirements

  • Install: Integrate via NuGet packages Axodox.Common and Axodox.MachineLearning into Visual Studio C++ projects (Desktop/UWP).
  • Prerequisites: Visual Studio 2022 with C++ workloads, C++20 compiler support. Requires x64 platform.
  • Build: Use build_nuget.ps1 or build from Visual Studio. Set AxodoxMachineLearning-Location environment variable to point to local build for development.
  • Docs: Example integration

Highlighted Details

  • Pure C++ implementation for simplified deployment and integration.
  • Supports Stable Diffusion 1.5/XL, ControlNet, OpenPose, MiDAS, HED.
  • Optimized ONNX models for DirectML.
  • GPU accelerated feature extractors for guided image generation.

Maintenance & Community

The project is maintained by axodox. Further community or roadmap information is not detailed in the README.

Licensing & Compatibility

  • License: MIT.
  • Compatibility: Source code is MIT licensed, allowing commercial use and closed-source linking. Model weights require checking original licenses. The library currently targets Windows x64.

Limitations & Caveats

The current codebase and NuGet packages are Windows-specific, though porting to other platforms is stated as feasible with minimal effort. The library is x64 only.

Health Check
Last Commit

3 months ago

Responsiveness

1 day

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

Explore Similar Projects

Starred by Patrick von Platen Patrick von Platen(Author of Hugging Face Diffusers; Research Engineer at Mistral), Georgios Konstantopoulos Georgios Konstantopoulos(CTO, General Partner at Paradigm), and
2 more.

diffusers-rs by LaurentMazare

0%
572
Rust implementation of the Diffusers API for generative models
Created 2 years ago
Updated 1 year ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Luca Antiga Luca Antiga(CTO of Lightning AI), and
2 more.

mmagic by open-mmlab

0.1%
7k
AIGC toolbox for image/video editing and generation
Created 6 years ago
Updated 1 year ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Lyumin Zhang Lyumin Zhang(Author of ControlNet), and
4 more.

Fooocus by lllyasviel

0.1%
46k
Image generator for streamlined prompting and generation using SDXL
Created 2 years ago
Updated 2 weeks ago
Feedback? Help us improve.