TensorStack.OnnxRuntime 0.15.0

Prefix Reserved
dotnet add package TensorStack.OnnxRuntime --version 0.15.0
                    
NuGet\Install-Package TensorStack.OnnxRuntime -Version 0.15.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TensorStack.OnnxRuntime" Version="0.15.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TensorStack.OnnxRuntime" Version="0.15.0" />
                    
Directory.Packages.props
<PackageReference Include="TensorStack.OnnxRuntime" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TensorStack.OnnxRuntime --version 0.15.0
                    
#r "nuget: TensorStack.OnnxRuntime, 0.15.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TensorStack.OnnxRuntime@0.15.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TensorStack.OnnxRuntime&version=0.15.0
                    
Install as a Cake Addin
#tool nuget:?package=TensorStack.OnnxRuntime&version=0.15.0
                    
Install as a Cake Tool

TensorStack.OnnxRuntime

TensorStack.OnnxRuntime is the ONNX Runtime layer used by TensorStack.OnnxRuntime.Vision and TensorStack.OnnxRuntime.LLM.

Nuget Package

OnnxRuntime Badge

It manages devices, execution providers and model sessions, and handles input type conversion and the creation, use and disposal of OrtValue objects.

Providers

Provider uses the DirectML execution provider, and initializes itself on first use.

// Best GPU
ExecutionProvider provider = Provider.GetProvider();

// By device type, or device type and id
ExecutionProvider cpuProvider = Provider.GetProvider(DeviceType.CPU);
ExecutionProvider gpuProvider = Provider.GetProvider(DeviceType.GPU, deviceId: 1);

// List devices
foreach (var device in Provider.GetDevices())
{
    Console.WriteLine($"{device.Type}: {device.Name}");
}

Model Sessions

ModelSession loads an ONNX model from a ModelConfig and runs inference.

var config = new ModelConfig
{
    Path = "model.onnx",
    ExecutionProvider = Provider.GetProvider()
};

using (var session = new ModelSession(config))
{
    ModelMetadata metadata = await session.LoadAsync();

    using (var parameters = new ModelParameters(metadata))
    {
        // Inputs are added in model input order
        parameters.AddInput(imageTensor.GetChannels(3), Normalization.ZeroToOne);
        parameters.AddOutput(new[] { 1, 3, height * 4, width * 4 });

        using (var results = await session.RunInferenceAsync(parameters))
        {
            // Read outputs
        }
    }
}
Product Compatible and additional computed target framework versions.
.NET net10.0-windows10.0.17763 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on TensorStack.OnnxRuntime:

Package Downloads
TensorStack.OnnxRuntime.Vision

Image and video upscaling for .NET using ONNX Runtime.

TensorStack.OnnxRuntime.LLM

Text generation for .NET using ONNX Runtime.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.15.0 56 11/18/2026
0.14.14 65 11/17/2026
0.14.13 102 11/16/2026
0.14.12 101 11/15/2026
0.14.11 99 11/15/2026
0.14.10 108 11/14/2026
0.14.9 101 11/13/2026
0.14.8 102 11/10/2026
0.14.7 101 11/8/2026
0.14.6 108 11/5/2026
0.14.5 125 11/1/2026
0.14.4 182 10/29/2026
0.14.3 116 10/28/2026
0.14.2 158 10/20/2026
0.14.1 139 10/16/2026
0.13.13 130 10/11/2026
0.13.12 123 10/10/2026
0.13.10 134 10/6/2026
0.13.9 118 10/5/2026
0.13.8 126 10/4/2026
Loading failed