Skip to content

remove.ac · Independent guide

WebGPU vs WASM for in-browser background removal: 489 real-device timings, and why we turned WebGPU off

Real-device telemetry from 489 in-browser background removal runs (130 first cutouts, Sep 8 – Oct 11, 2026) with p50/p95 by WebGPU or WASM, desktop or phone, and CPU core count — plus why WebGPU was faster but got disabled.

Published · Sources checked · 阅读中文版

Most WebGPU vs WASM background-removal comparisons online report a single number from one high-end workstation. remove.ac (unified from our earlier Koutuxia / 抠图侠 browser engine) runs its free cutout model directly inside the visitor's browser and buckets anonymous timing telemetry by execution backend and device class, letting us publish a cross-device table instead.

The short answer: on the same machine with the same image, pure WebGPU inference really is several times faster. On real visitors' devices, a first cutout also pays for runtime loading and warm-up, so the gap narrows. More importantly, the WebGPU backend in ONNX Runtime Web 1.27 produced wrong alpha outputs with our int8 weights — so since September 13, 2026, production runs deterministically on WASM only.

Data snapshot (October 14, 2026): The table below comes from our benchmarks data endpoint exported on October 14, covering 489 samples (130 first cutouts) reported from September 8 to October 11, 2026. The live Benchmarks & Dataset page refreshes hourly as new samples arrive; rows with fewer than 30 samples carry limited statistical weight and display their exact sample count.

1. Same machine, same image: WebGPU inference was ~6× faster — and wrong

On September 13, 2026 we compared both backends in a browser on our development machine (Apple M4, 16 GB), using the same 1024-input int8 model, the same image, and the same page: WASM inference took 16.8 s and WebGPU took 2.8 s. Running the same model with fp32 weights on WebGPU took 3.7 s.

Speed was not the problem; numerical correctness was. With int8 weights on WebGPU the lowest output logit was only −5.34 (versus −20.70 on WASM), background confidence collapsed, and the share of pixels with alpha ≤ 0.05 fell from 76.0% to 2.2%. Because fp32 on WebGPU matched WASM, the fault traced to the int8 DequantizeLinear path in the ORT-web 1.27 WebGPU backend rather than WebGPU itself.

In finished cutouts — 7 opaque objects from the AIM-500 dataset evaluated in a production build inside a real browser against ground truth — WebGPU at 1024 had a median SAD of 6.15 versus 1.10 for WASM at 1024, and WASM won on all 7 images. We disabled WebGPU in production the same day.

2. How WASM recovered the speed with FP16 weights

Part of WASM's slowness also came from int8 weights, because runtime dequantization adds an extra pass of work. After switching to fp16 weights (~78.2 MiB download), 1024-input inference on the same image dropped from 16.8 s to 6.95 s — about 8.0 s end to end, level with the 6–8 s users had been seeing on WebGPU — while keeping quality at a median SAD of 1.10.

When shipping a quantized vision model in the browser, verify that WebGPU output matches WASM value for value before comparing latency. Our gate for re-enabling WebGPU remains fp16 weights matching WASM in a real browser; as of the September 13 notes, the fp16 graph conversion hit a mixed-type Conv node, so production stays on deterministic WASM.

3. Real-device first-cutout telemetry (489 total samples, Sep 8 – Oct 11, 2026)

The table below measures the “first cutout” phase — from pressing the button to receiving the composited result, including decoding, preprocessing, inference, and guided-filter compositing — bucketed by backend, device class, and CPU core range. All WebGPU rows were recorded from September 8 to 12 before shutdown using a 768 input; most WASM rows in this window used a 512 input, so treat input resolutions carefully rather than as a strict like-for-like benchmark.

First-cutout time across real visitor devices (exported October 14, 2026; window Sep 8 – Oct 11, 2026)
Backend · device · CPU coresModel inputSamplesp50p95
WebGPU · desktop · 12+76824.7 s7.4 s
WebGPU · desktop · 8–1176814.8 ssingle sample
WebGPU · desktop · 4–7768314.3 s17.2 s
WebGPU · phone · 8–11768212.2 s12.3 s
WASM · desktop · 12+512333.6 s9.7 s
WASM · desktop · 12+76816.1 ssingle sample
WASM · desktop · 8–11512722.1 s10.2 s
WASM · desktop · 4–7512311.3 s14.6 s
WASM · desktop · 1–351265.2 s6.4 s
WASM · phone · 8–1151254.1 s5.4 s
Single-threaded WASM · phone · 8–11768244.1 s44.9 s

Key takeaways: WASM first cutouts on 8–11-core desktops have a p50 of 2.1 s (72 samples) and a p95 of 10.2 s. WebGPU on 4–7-core desktops had a first-cutout p50 of 14.3 s (3 samples), with session creation alone taking 8.5 s, whereas warm repeat runs on 8–11-core desktops hit p50 1.6 s (3 samples). On phones, multi-threaded WASM (p50 4.1 s, 5 samples, 512 input) vs. single-threaded WASM (p50 44.1 s, 2 samples, 768 input) mattered far more than WebGPU (p50 12.2 s, 2 samples).

4. Methodology limits, FAQ, and how to reproduce on your device

Privacy & bucketing limits: the browser buckets hardware (desktop vs. mobile, CPU core range) locally before reporting, never sends the raw User-Agent or any image/filename data, and does not deduplicate across sessions — so one visitor cutting out ten images contributes ten samples, and individual phone models are intentionally indistinguishable.

  1. Open the live Benchmarks & Dataset page to inspect all five phases (model download, cache hit, session load, first cutout, repeat cutout) and download the CC BY 4.0 JSON or CSV summary.
  2. Open the on-device image editor (with manual Erase and Restore brush refinement and 12 Undo/Redo steps) or the 50-file local batch workspace in a foreground window with Browser DevTools -> Network open; background tabs are throttled by browsers.
  3. When your session is sampled (20% of sessions, with an opt-out toggle on /benchmarks), inspect the POST /api/benchmarks/collect payload to see your exact first-cutout and pure ORT session.run milliseconds.
  • Is WebGPU always faster than WASM? Pure inference was 2.8 s vs. 16.8 s on int8 weights, but cold first cutouts on real desktops ranged from 4.7 s to 14.3 s due to shader compilation and session creation.
  • Are my images uploaded during benchmarking? No. On the free local path, segmentation runs inside your browser tab; telemetry carries only timing numbers and coarse hardware buckets.

Sources

Official provider documents and public datasets referenced in this guide. Provider policies, pricing and endpoints can change; check original pages before deploying.

Independent editorial material from remove.ac. This page does not announce a partnership, endorsement or official-successor relationship with the providers mentioned.