Skip to content

About

C# Generative AI SDK - Text, Image, Video and Audio supported

Topics

Resources

Stars

51 stars

Watchers

5 watching

Forks

Repository files navigation

TensorStack

Common Badge Nuget GitHub last commit

A modular .NET SDK for building AI-powered applications on Windows OS.

TensorStack provides reusable components for local AI inference, text generation, image, video and audio generation, media processing, hardware acceleration, and application development through a unified developer experience.

Built for performance and flexibility, TensorStack powers all applications developed by TensorStack-AI, including Amuse, the official reference application and UI demonstration of the platform.


Features

  • Native .NET SDK
  • Local AI inference across multiple backends (stable-diffusion.cpp, llama.cpp, audio.cpp, vision.cpp, ncnn, HuggingFace)
  • Text generation and LLM integration, with streaming, thinking, tool calls and image/audio input
  • Image and video generation
  • Music, speech and speech recognition
  • Image upscaling and extraction pipelines
  • Edge, line art, depth, background removal and pose extraction
  • Video frame interpolation
  • Image, video, and audio processing
  • Hardware acceleration for Nvidia, AMD, Intel and CPU
  • Python interoperability
  • Extensible provider architecture

Backends

Each backend wraps a native or Python runtime behind the same pattern: create a backend for a VendorType, initialize it, then load a pipeline.

using (var backend = new LlamaCppBackend(VendorType.Nvidia))
{
    await backend.InitializeAsync();

    using (var pipeline = new LlamaCppPipeline(backend))
    {
        await pipeline.LoadAsync(options);
        // Generate
    }
}
Backend Runtime Use
TensorStack.HuggingFace Diffusers & Transformers (Python) Image and video generation
TensorStack.StableDiffusionCpp stable-diffusion.cpp GGUF image and video generation
TensorStack.LlamaCpp llama.cpp GGUF language models, tool calls, image/audio input
TensorStack.AudioCpp audio.cpp Music, speech and speech recognition
TensorStack.VisionCpp vision.cpp & ncnn Image extractors, background removal, pose and frame interpolation

Packages

Core

Package Description Docs Package
TensorStack.Common Tensor types, pipelines and backend base classes README Common Badge
TensorStack.Media Image/Audio/Video loading, saving and streaming README Media Badge

Generation Backends

Package Description Docs Package
TensorStack.HuggingFace .NET → Python interface for Diffusers & Transformers README HuggingFace Badge
TensorStack.StableDiffusionCpp .NET wrapper for stable-diffusion.cpp README StableDiffusionCpp Badge
TensorStack.LlamaCpp .NET wrapper for llama.cpp README LlamaCpp Badge
TensorStack.AudioCpp .NET wrapper for audio.cpp README AudioCpp Badge

Vision Backends

Package Description Docs Package
TensorStack.VisionCpp .NET wrapper for vision.cpp and ncnn README VisionCpp Badge

Requirements

  • Windows 10 (1809) or later, x64
  • .NET 10 (net10.0-windows10.0.17763.0)

External Dependencies

About

C# Generative AI SDK - Text, Image, Video and Audio supported

Topics

Resources

Stars

51 stars

Watchers

5 watching

Forks

Used by

Contributors

Languages