Latest TensorStack SDK v0.14.8 on NuGet

Local generative AI,
native to .NET.

TensorStack is an open-source C# SDK for running image, video, audio and language models on local GPUs — one typed, async API over ONNX Runtime, stable-diffusion.cpp and Hugging Face Diffusers.

Get started
dotnet add package TensorStack.Common
  • Windows
  • NVIDIA, AMD & Intel GPUs
  • Open source
The TensorStack Four layers: your applications, such as Amuse, on top of the TensorStack SDK, which runs on ONNX Runtime, stable-diffusion.cpp and Hugging Face Diffusers, accelerated on the GPU by CUDA, Vulkan and DirectML. GPU04 — HardwareYour GPUCUDA · Vulkan · DirectML ONNXsd.cppPython03 — RuntimesInference enginesONNX Runtime · stable-diffusion.cppHugging Face Diffusers CommonMediaOnnxRuntimeVisionLLMHuggingFaceSD.cppWPF02 — SDKTensorStack SDKModular C# pipelines on NuGet 01 — AppsYour applicationsDesktop apps, tools and servicesAmuse is the reference appYour appAmuse
  1. 01Your applicationsDesktop apps, tools and services — like Amuse
  2. 02TensorStack SDKModular C# pipelines on NuGet
  3. 03Inference enginesONNX Runtime · stable-diffusion.cpp · Diffusers
  4. 04Your GPUCUDA · Vulkan · DirectML

Runs today's open models

  • ImageFLUX.2
  • VideoWan 2.2
  • ImageQwen Image
  • AudioACE-Step XL
  • ImageZ-Image
  • TextGemma 4
  • ImageStable Diffusion 3
  • VideoCogVideoX
  • ImageChroma
  • AudioWhisper
  • ImageHiDream-O1
  • VideoKandinsky 5
  • TextQwen 3.6
  • ImageStable Diffusion XL
  • VideoSkyReels-V2
  • AudioSupertonic v3
  • ImageKrea2
  • VideoMiniMax-H3
  • ImageFLUX.3
  • ImageGLM Image
  • AudioLongCat Audio
  • ImageFibo 2.0
  • ImageMOSS-Image
  • ImageErnie Image
Capabilities

One SDK.
Every modality.

Generate images and video, transcribe and synthesize speech, and run language models from the same C# codebase. Each capability ships as a focused NuGet package on a shared core.

Browse all packages

Image

Text-to-image and image editing with diffusion models, plus upscaling, background removal, and pose and feature extraction.

Packages
  • StableDiffusionCpp
  • HuggingFace
  • OnnxRuntime.Vision

Video

Text-to-video generation, frame interpolation, and upscaling for buffered or streamed video.

Packages
  • StableDiffusionCpp
  • OnnxRuntime.Vision
  • Media

Audio

Speech recognition with Whisper and text-to-speech with Supertonic voices, with FFmpeg-backed audio input and output.

Packages
  • OnnxRuntime.LLM
  • Media

Text

Llama and Phi-3 language models with greedy or beam search decoding, plus Transformers pipelines through Hugging Face.

Packages
  • OnnxRuntime.LLM
  • HuggingFace
Developer experience

One shape for every pipeline.

Create a pipeline, pass an options record, await the result. The pattern stays the same whichever engine runs the model underneath.

  • Typed, async C# with options records and progress callbacks
  • Media as tensors, with helpers to load, save and stream images, video and audio
  • Hardware setup handled — backends fetch the right build for the user's GPU
  • Python managed for you — Diffusers runs in environments the SDK creates and maintains
// Upscale an image and a video 4x with ONNX Runtime
var pipeline = UpscalePipeline.Create(new UpscalerConfig
{
    ScaleFactor = 4,
    Normalization = Normalization.ZeroToOne,
    ExecutionProvider = Provider.GetProvider(),
    Path = @"Models\RealESR-General-4x.onnx"
});

// Image
var image = new ImageInput("Input.png");
var upscaled = await pipeline.RunAsync(
    new UpscaleImageOptions { Image = image });
await upscaled.SaveAsync("Output.png");

// Video, streamed frame by frame
var stream = await VideoInputStream.CreateAsync("Input.mp4");
var video = pipeline.RunAsync(
    new UpscaleStreamOptions { Stream = stream.GetAsync() });
await video.SaveAsync("Output.mp4");
Why TensorStack

Built for AI that runs on your own hardware.

TensorStack gives .NET teams the building blocks for local inference — engines, GPU acceleration and typed pipelines — without leaving C#.

Private by design

Inference runs on the user's own GPU, so prompts, media and outputs stay on the device, with no per-request fees.

Three engines, one API

ONNX Runtime, stable-diffusion.cpp and Hugging Face Diffusers behind consistent, strongly typed C# pipelines.

Every major GPU

CUDA for NVIDIA, Vulkan across AMD, Intel and NVIDIA, and DirectML on any DirectX 12 GPU.

Modular packages

Focused NuGet packages on a shared core. Install only what you use, and extend it with your own providers.

Native .NET

C# from the UI down to the tensors, with Python interop through CSnakes only where the model ecosystem requires it.

Open source

Apache-2.0 licensed and developed in the open on GitHub. Inspect it, extend it and ship it without lock-in.

Reference application

Amuse, built on TensorStack.

A complete desktop AI studio for Windows and the reference application for the SDK: a working demonstration of what TensorStack can do, and an open-source blueprint for your own app.

  • 40+ model pipelines across image, video, audio and text
  • All three engines — stable-diffusion.cpp, ONNX Runtime and Hugging Face — in one app
  • Apache-2.0 source you can read, learn from and build on
The Amuse Image studio generating a surreal floating city with glowing jellyfish using FLUX.2 Klein 9B
Amuse · Image studioFLUX.2 Klein 9B on stable-diffusion.cpp
Open source

Built in the open.

TensorStack and Amuse are developed on GitHub under the Apache-2.0 license. Star a repository, open an issue or send a pull request — contributions are welcome.

59k+NuGet downloads
700+GitHub stars
8Focused NuGet packages
3Inference engines, one API

Start building with TensorStack.

Add local image, video, audio and text generation to your .NET application, one NuGet package at a time.