Skip to content

0.6.0

Choose a tag to compare

@pissang pissang released this 25 Oct 04:23
· 37 commits to main since this release

oidn-webgpu 0.6.0 is the first release under the new package name. It adds experimental native Rust and C APIs, sanitizes inputs and outputs like OIDN, and lowers default FP16 latency in Chrome by up to 19% on the measured GPUs. The package name is the only breaking change.

Breaking changes

  • The package is renamed from oidn-web to oidn-webgpu. Replace the dependency and imports (import { initUNetFromURL } from 'oidn-webgpu'); the API is unchanged.

Added

  • Experimental native denoising through Rust and C APIs on Metal, Vulkan or Direct3D 12. Rust hosts can share GPU buffers; the C API accepts CPU images. See the native guide.
  • Native releases provide precompiled C packages and a Rust crate with SHA-256 verified cores for Windows x86_64 MSVC, Linux x86_64 GNU, macOS x86_64 and macOS ARM64. The bundled crate builds without Node, npm, Zig or build-time downloads from GitHub.
  • Native packages include standalone Rust and Windows MSVC applications for output validation and timing. The Rust application's Git dependency is pinned to the package source revision.
  • Experimental kernel: 'subgroup-matrix' and subgroupMatrix tuning options. Browsers need chromium-experimental-subgroup-matrix; native hosts need wgpu cooperative-matrix support.

Changed

  • Default FP16 denoising in Chrome has 11–19% lower latency on Apple M4 Max and 0–16% on NVIDIA RTX 4060 Laptop than 0.5.0 (Performance); first initialization takes longer. Output differs slightly from 0.5.0; gemm: { decoderSubPixel: false } restores the 0.5.0 decoder calculation. FP32 is unchanged.
  • getLastExecutionProfile() sums network time over all tiles of an image instead of reporting only the first tile. Preprocessing and output conversion are excluded.

Fixed

  • Browser CPU input preserves normalized Float32Array albedo and normal values instead of dividing them by 255. tileExecute now accepts floating-point auxiliary images in its TypeScript API; 8-bit auxiliary images still use [0, 255].
  • Windows native packages build and link with MSVC. C consumers use the DLL CRT (/MD).
  • Native cooperative-matrix denoising produces finite, repeatable output with shader runtime checks disabled on the tested NVIDIA Vulkan device.
  • Native distributions include the required runtime license notices, and the crate declares the bundled components' licenses alongside MIT.
  • Inputs and network outputs are sanitized like OIDN: NaN becomes 0, and color, albedo and normals are clamped to their valid ranges. Previously NaN or out-of-range input could spread across the image, HDR output could be negative and GPU LDR output could exceed 1.
  • examples/aux.* are renamed to examples/auxiliary.* so the repository can be checked out on Windows, where AUX is a reserved file name.

Install

The browser package is available on npm.

npm i oidn-webgpu

The archive contains the browser library, type declarations and bundled scripts. Weights are separate: choose a TZA file from the weights table.

Rust and C downloads are in Native 0.1.0. Native APIs remain experimental; Rust hosts must share the exact wgpu 30.0.1 crate and source.

Validation

  • 64 JavaScript tests, 5 native unit tests and 4 native GPU tests passed on Apple M4 Max / macOS Metal.
  • 27 external C/Rust application cases passed. All 15 output comparisons were byte-identical; the real 1024×1024 HDR example also matched between C and the browser with implicit GEMM / FP16.
  • The browser archive installed into a separate application, built with Vite and completed WebGPU inference.
  • Four-platform CI builds packages and verifies the standalone crate without a GPU. This local validation did not exercise Windows/Linux GPU execution or Intel Mac GPUs.

Full changelog and performance measurements.

Source: 1d7dd4a. Four-platform CI.