{"id":42141193,"url":"https://github.com/blace-ai/blace-ai","last_synced_at":"2026-03-03T12:02:29.068Z","repository":{"id":268587648,"uuid":"895498453","full_name":"blace-ai/blace-ai","owner":"blace-ai","description":"Cross-platform c++ sdk \u0026 model hub for cross-platform AI inference. Ready-to-deploy models including Segment Anything 3, Depth Anything 2 and Gemma.","archived":false,"fork":false,"pushed_at":"2026-01-26T15:36:59.000Z","size":2505,"stargazers_count":66,"open_issues_count":1,"forks_count":3,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-01-27T04:22:02.863Z","etag":null,"topics":["ai-hub","ai-inference","ai-sdk","cpp","libtorch","onnxruntime"],"latest_commit_sha":null,"homepage":"https://blace.ai","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blace-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-28T10:19:01.000Z","updated_at":"2026-01-26T15:38:23.000Z","dependencies_parsed_at":"2024-12-17T18:19:16.426Z","dependency_job_id":"e08c2658-b084-4684-83df-dd8a0d56190a","html_url":"https://github.com/blace-ai/blace-ai","commit_stats":null,"previous_names":["blace-ai/blace-ai"],"tags_count":46,"template":false,"template_full_name":null,"purl":"pkg:github/blace-ai/blace-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blace-ai%2Fblace-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blace-ai%2Fblace-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blace-ai%2Fblace-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blace-ai%2Fblace-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blace-ai","download_url":"https://codeload.github.com/blace-ai/blace-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blace-ai%2Fblace-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28877887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-hub","ai-inference","ai-sdk","cpp","libtorch","onnxruntime"],"created_at":"2026-01-26T17:09:37.033Z","updated_at":"2026-01-29T13:01:39.368Z","avatar_url":"https://github.com/blace-ai.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# blace.ai inference library \u0026 c++ model hub  \n\n[![Production Deployments](https://img.shields.io/badge/Production%20Deployments-10.000+-blue)](#) [![C++](https://img.shields.io/badge/C++-%2300599C.svg?logo=c%2B%2B\u0026logoColor=white)](#) [![macOS](https://img.shields.io/badge/macOS-000000?logo=apple\u0026logoColor=F0F0F0)](#) [![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?logo=ubuntu\u0026logoColor=white)](#) [![Windows](https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11)](#)\n\nWelcome to blace.ai — a high-performance C++ meta-inference library originally developed as the core framework behind [Blace Plugins'](https://blaceplugins.com/) AI-driven video editing tools.  \nIt abstracts away OS, framework (PyTorch and ONNX), and hardware accelerator differences. With a unified API and minimal setup, you can easily integrate AI models into your native, python-less, applications.  \n\nProducts using blace.ai are already trusted in production and have been used by more than **10,000 customers worldwide**.\n\n\n\n📦 [**download sdk**](https://github.com/blace-ai/blace-ai/releases) | 🌐 [**blace.ai website**](https://blace.ai) | 📖 [**documentation**](https://blace-ai.github.io/blace-ai/) | 🧦 [**c++ model hub**](https://github.com/blace-ai/hub) | 💬 [**discord channel**](https://discord.com/channels/1202176342603616277/1318605344586338404)\n\n## Overview\n![Screenshot](img/overview.svg) \u003cbr/\u003e\u003cbr/\u003e\n## Features\n-  **Cross-Platform:** Write C++ code for AI model inference once - and deploy to \n  all major operating systems (Windows, MacOS Intel/Silicon and Linux).  \n- **AI-Framework-Agnostic:** blace.ai supports a growing list of frameworks and providers like Torchscript (CUDA and MPS) and ONNX (CPU and DirectML) out of the box.\n- **IPC \u0026 Process Isolation:**\nblace.ai can run workloads in separate isolated processes connected via high-performance inter-process communication ([IPC](https://blace-ai.github.io/blace-ai/ipc.html)).\nThis architecture brings several advantages:\n  - Crash Containment: AI backends are complex and can fail; isolation ensures such failures only stop the affected process, not your main application.\n  - Memory Isolation: GPU and CPU memory usage is separated, preventing leaks from impacting the rest of the system.\n  - Lightweight Device Support: IoT and other resource-constrained devices can use the IPC version of the library and offload heavy computations to a more powerful remote system, enabling high-performance AI inference even on minimal hardware. \n- **Self-Contained:** Our library is fully self-contained and ships with all necessary dependencies out of the box,\n  making integration effortless and eliminating the hassle of managing third-party packages. Furthermore, it has **no python dependencies**.\n- **Performant computation graphs:** We provide you with a set of operators that can be used to write \n  computation graphs for **multi-model inference**. This is the structure of a simple computation graph running the Segment-Anything encoder and decoder seperately, automatically caching the intermediate results (dark orange node): \u003cbr/\u003e\u003cbr/\u003e\n  ![Screenshot](img/dag_example_2.svg) \u003cbr/\u003e\u003cbr/\u003e\n- **Serializable:** Built-in serialization allows you to **save and transfer\n  computation graphs**, making it easier to integrate with distributed systems and enabling seamless scaling across multiple nodes or environments.\n- **Smart models:** Models created with the [**Model Wizard**](https://blace-ai.github.io/blace-ai/model_wizard_creation.html) or \n  coming from the [Hub](https://www.blace.ai/hub/) store all needed configuration and \n  metadata about inputs and outputs. This eliminates the need to worry about proper model instantiation or tensor input formatting, such as memory order and sizes, streamlining the integration process.\n\n## Hardware Support\nSince the unified model format abstracts from AI frameworks, blace.ai has a deployment path for accelerated inference on most host / hardware combinations.\n\n| Host                              | ONNX CPU | Torchscript CPU | 🏎️ Torchscript MPS | 🏎️ Torchscript CUDA | 🏎️ ONNX DirectML |\n|-----------------------------------|----------|-----------------|---------------------|----------------------|-------------------| \n| Ubuntu                            | ✅        | ✅               | -                   | -                    | -                 |\n| Ubuntu (NVIDIA card)              | ✅      | ✅               | -                  | ✅                    | -                 |\n| MacOS (Intel)                     | ✅      | ✅               | -                  | -                    | -                |\n| MacOS (Silicon)                   | ✅      | ✅               | ✅                   | -                    | -                |\n| Windows (DirectML supported card) | ✅      | ✅               | -                  | -                    | ✅                 |\n| Windows (NVIDIA card)             | ✅      | ✅               | -                  | ✅                    | ✅                 |\n\n## Model Hub\n[**blace.ai hub**](https://www.blace.ai/hub/) is a growing list of AI model compatible with the inference sdk. All models are carefully optimized, continuously tested on supported backends and can be integrated into .cpp applications with a few lines of code.\n\n![Screenshot](img/hub.png)\n\nTo request integration of a specific model, please [open a ticket](https://github.com/blace-ai/blace-ai/issues/new). \n\n## Quick Start  \n\nFollow the [**Quickstart Guide**](https://blace-ai.github.io/blace-ai/getting_started.html) to run the first model within a few minutes.\n\nIntegrating AI models into your software should be simple. With Blace.ai, you can run AI model inference with just a few lines of code — across **Windows, Linux, and macOS**:  \n\n```cpp\n#include \"blace_ai.h\"\n\n// include the models you want to use\n#include \"depth_anything_v2_v8_small_v3_ALL_export_version_v17.h\"\n\nvoid runDepthModel(std::string input_file, std::string output_file) {\n  // have this present globally\n  workload_management::BlaceWorld blace;\n\n  // load image into op\n  auto image_mem = raw_memory_from_file(input_file);\n  auto world_tensor_orig = CONSTRUCT_OP(blace::ops::FromRawMemoryOp(image_mem));\n\n  // interpolate to smaller size\n  auto interpolated = CONSTRUCT_OP(ops::Interpolate2DOp(\n      world_tensor_orig, 700, 1288, ml_core::BICUBIC, false, true));\n\n  // construct model inference arguments for cross-platform compatibility\n  ml_core::InferenceArgsCollection infer_args;\n  infer_args.inference_args.backends = {\n      ml_core::TORCHSCRIPT_CUDA_FP16, ml_core::TORCHSCRIPT_MPS_FP16,\n      ml_core::ONNX_DML_FP32, ml_core::TORCHSCRIPT_CPU_FP32};\n\n  // construct inference operation\n  auto infer_op = CONSTRUCT_OP(ops::InferenceOp(\n      depth_anything_v2_v8_small_v3_ALL_export_version_v17, {interpolated},\n      infer_args, 0, util::getPathToExe().string()));\n\n  // normalize depth to zero-one range\n  auto result_depth = CONSTRUCT_OP(ops::NormalizeToZeroOneOP(infer_op));\n\n  // save result to image file\n  result_depth = CONSTRUCT_OP(ops::SaveImageOp(result_depth, output_file));\n\n  // construct (IPC) evaluator and evaluate to raw memory object\n#ifndef BLACE_AI_USE_IPC\n  computation_graph::GraphEvaluator evaluator(result_depth);\n  auto eval_result = evaluator.evaluateToRawMemory();\n#else\n  ipc::IpcEvaluator ipc_evaluator(result_depth);\n  auto eval_result = ipc_evaluator.evaluateToRawMemory();\n#endif\n\n  assert(eval_result.first == ml_core::ReturnCode::OK);\n\n  return;\n}\n```\n\n## Installation\nIntegrate blace.ai into your CMake project with just two lines.\n\n```\ninclude(\"../cmake/FindBlace.cmake\")\ntarget_link_libraries(\u003cyour_target\u003e PRIVATE 3rdparty::BlaceAI)\n```\n\n## Roadmap\n- for feature request please contact us via mail or open an issue here \n\n## Origin\nOriginally developed as the internal framework for [Blace Plugins'](https://blaceplugins.com/) AI-driven video editing tools, blace.ai has proven its reliability in production environments. Recognizing its potential to benefit a broader audience, we are thrilled to release blace.ai to the public.\n\n## Feedback \u0026 Bug Repots\nPlease [open a ticket](https://github.com/blace-ai/blace-ai/issues/new) or reach out to contact [at] blace.ai  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblace-ai%2Fblace-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblace-ai%2Fblace-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblace-ai%2Fblace-ai/lists"}