LightStudio.OnnxWeb 1.30.0.1

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package LightStudio.OnnxWeb --version 1.30.0.1
                    
NuGet\Install-Package LightStudio.OnnxWeb -Version 1.30.0.1
                    
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="LightStudio.OnnxWeb" Version="1.30.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LightStudio.OnnxWeb" Version="1.30.0.1" />
                    
Directory.Packages.props
<PackageReference Include="LightStudio.OnnxWeb" />
                    
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 LightStudio.OnnxWeb --version 1.30.0.1
                    
#r "nuget: LightStudio.OnnxWeb, 1.30.0.1"
                    
#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 LightStudio.OnnxWeb@1.30.0.1
                    
#: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=LightStudio.OnnxWeb&version=1.30.0.1
                    
Install as a Cake Addin
#tool nuget:?package=LightStudio.OnnxWeb&version=1.30.0.1
                    
Install as a Cake Tool

LightStudio.OnnxWeb

ONNX Runtime Web 1.30.0 with WebGPU and WebAssembly execution providers. The NuGet package deploys self-hosted ES modules and Wasm binaries to wwwroot/onnx. Its asynchronous API runs sessions in a dedicated module worker. WebGPU creation or execution failures are logged and retried on CPU; every result reports the active execution device. Unsupported WebGPU operators can also run on CPU.

npm ci --prefix package/onnx-web
npm run build --prefix package/onnx-web
dotnet pack package/onnx-web/LightStudio.OnnxWeb.csproj -c Debug -o artifacts/packages

The build stages the exact npm-locked upstream distribution, its license and third-party notices, and SHA-256 hashes. Node.js 20 or later and .NET 10 are required. Consume the local package from artifacts/packages.

import { OnnxWeb } from "./onnx/lightstudio-onnx-web.mjs";

const runtime = new OnnxWeb();
const session = await runtime.createSession(modelBytes, { device: "webgpu" });
const result = await runtime.run(session.id, {
    input: { type: "float32", dims: [1, 2], data: new Float32Array([1, 2]) },
}, ["output"]);
await runtime.releaseSession(session.id);
runtime.dispose();

createSession accepts ONNX Runtime session options plus device (webgpu or wasm) and an optional third argument containing external model files as { path, data: Uint8Array }. Session descriptions include input/output metadata. run accepts numeric tensors and returns their typed data, shape, and type. fingerprint(bytes) computes an MD5 identifier through hash-wasm 4.12.0 in the worker; this identifies model presets, not download integrity or authenticity. For streaming integrity checks, createHash("SHA256") or createHash("SHA1") returns a hash handle. Await appendHash(handle, bytes) for each bounded chunk, then finishHash(handle) returns the hexadecimal digest and releases the handle. releaseHash(handle) discards an unfinished hash and is safe after completion. Operations are serialized in the worker. Inputs are copied before transfer; returned tensors belong to the caller. Release sessions after pending work finishes. dispose terminates all work and rejects pending requests.

Serve .mjs as JavaScript and .wasm as application/wasm. WebGPU requires a secure context and a supported adapter. Cross-origin isolation (COOP/COEP) enables up to four CPU threads; otherwise the runtime uses one. Model requests must obey browser CORS rules and available memory limits. ONNX Runtime cannot interrupt an individual running inference; consumers should observe cancellation between runs or terminate a dedicated runtime. No assets are loaded from a CDN at runtime.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated