axodox-machinelearning  by axodox

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

created 2 years ago
621 stars

Top 53.9% 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

2 months ago

Responsiveness

1 day

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

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Nat Friedman Nat Friedman(Former CEO of GitHub), and
32 more.

llama.cpp by ggml-org

0.4%
84k
C/C++ library for local LLM inference
created 2 years ago
updated 14 hours ago
Feedback? Help us improve.