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
tractcrate, with weights from Hugging Face at pinned revisions. Five demos underexamples/*/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
wgpufeature linking tract-wgpu natively and on wasm32.unstable-wgpu-asyncaddstract::wgpu::init().awaitandTensor::to_host_async().awaitfor 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-weightsand 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.

The Campfire
CommentsThanks. Your comment is waiting for the desk. Once it is approved it appears here within about a minute.
Add a comment