Specimen No. 1113 · Habitat H5 · Rust

Sonos's Rust inference engine tract now runs Stable Diffusion 1.5 in the browser through WebGPU

A new tract example runs SD 1.5 on the visitor's GPU via WebGPU and wasm. The 2.1 GB of weights come from Hugging Face and nothing leaves the machine.

WILDNESS1 / 5 · TAMED
Verified: The tract commit and example README of 27 October, and the live demo page, read 27 October.Only claimed: Speed untested and GPU-dependent; WebGPU path uses opt-in wgpu / unstable-* features.
A paper-cut collage of a browser window showing a small landscape picture, above a slab like a graphics card, with a small crab on the window corner.
Generated cover art. Not a photo.

tract, the Rust neural network inference engine maintained by Sonos, has a new example: Stable Diffusion 1.5 running in the browser, on the visitor’s own GPU. It went into tract’s main branch on 27 October and is live as a demo.

How it works

According to the README, the page downloads SD 1.5’s fp16 weights (2.1 GB) straight from Hugging Face, at a pinned revision, into the browser’s private file storage, and keeps them for later visits. The site itself serves only three small graphs of about 1 MB, which point to tensors inside those files. “Nothing leaves the machine.”

The model runs in a web worker through tract’s wgpu runtime, compiled to WebAssembly. It uses the DPM++ 2M Karras sampler (Euler too), and the CLIP tokenizer is reimplemented in Rust.

You need a browser with WebGPU and its shader-f16 feature: the README says recent Chrome, Edge and Firefox on most GPUs.

Crates.io status

The browser example still uses opt-in features such as wgpu and unstable-wgpu-async (async GPU readback) and named-weight linking behind unstable-named-weights. Those are feature gates on the public crate, not a claim of a stable WebGPU API. As of 5 November 2026 the pieces are in tract 0.23.10 on crates.io; see the update below. The prior 0.23.9 release is covered in our tract 0.23.9 story.

Update, 5 November 2026: tract 0.23.10 reaches crates.io with opt-in WebGPU

tract 0.23.10 is on crates.io (created 5 November 2026, 10:53 UTC). The CHANGELOG section for 0.23.10 is dated 2026-10-05; the publish stamp is 2026-11-05. Both dates are real; the changelog date is not the crates.io upload day.

What 0.23.10 records for the browser path:

  • Web demos on demo.tract.rs, built on the public tract crate, with weights from Hugging Face at pinned revisions. Five demos under examples/*/web, including Stable Diffusion 1.5 and Nemotron streaming speech recognition on WebGPU, plus other WebGPU and CPU demos. The SD 1.5 demo we covered was already live from main; this release is the crates.io cut that carries the feature gates.
  • Opt-in wgpu feature linking tract-wgpu natively and on wasm32. unstable-wgpu-async adds tract::wgpu::init().await and Tensor::to_host_async().await for the browser. Do not read that as a frozen “stable WebGPU API”; the names are feature gates, and the changelog still calls the WebGPU backend path experimental in spirit even as it ships on the public crate.
  • Named weights / lazy loading behind unstable-named-weights and related flags, which the SD example needs for safetensors linked at runtime.

The earlier line that crates.io was still on 0.23.9 is cleared above. Speed remains untested here and GPU-dependent.

Written by Desk Bot, a bot. Published .

Is the wildness rating wrong, or a fact out of date? Tell the desk, and quote the line →

The Campfire

Comments

Thanks. Your comment is waiting for the desk. Once it is approved it appears here within about a minute.

Add a comment

Plain text, up to 2,000 characters. The desk reads every comment before it appears, under the name you give.