{
  "id": 10421246,
  "title": "Three things that broke when I moved AI image models into the browser",
  "url": "https://urgent.news/2026/09/28/three-things-that-broke-when-i-moved-ai-image-models-into-the-browser",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-28T10:21:19.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mno_tao_236ab4649edf4cf9f/three-things-that-broke-when-i-moved-ai-image-models-into-the-browser-4ai5"
  },
  "original_language": "en",
  "account": "Here are three lessons learned from moving AI image models to the browser:\n\n1. The most advanced model may not fit the GPU hardware. The BiRefNet-lite model, which outperformed RMBG-1.4 in quality, failed to run on an Apple GPU due to exceeding the maximum storage buffers allowed. The model needed 11 storage buffers, but the hardware only allows 10. This highlights the importance of benchmarking models on the weakest GPUs that will be used before evaluating their performance.\n\n2. Models can silently produce incorrect results on WebGPU. LaMa, despite running without errors, produced white inpainted holes where the model should have corrected missing content. This was caused by WebGPU's Fourier convolution implementation yielding incorrect values. To avoid this, models should be tested using real pictures rather than just verifying that the execution completed successfully.\n\n3. Float16 precision can change unexpectedly. When using Real-ESRGAN's fp16 model with WebGPU, the upscaled image came out black. Chrome's recent addition of native Float16Array support meant the model returned float32 values instead of half-precision. Decoding those float32 values incorrectly as integers resulted in black output. The fix was to accept both float32 and float16 values, converting appropriately. This underscores the need to handle mixed precision scenarios when working with AI models in the browser.",
  "summary": "I rebuilt a retired photo-editing site so that every model runs client-side: object removal (MI-GAN, LaMa), background removal (RMBG-1.4) and 4× upscaling (Real-ESRGAN), all through ONNX Runtime Web with WebGPU and a WebAssembly fallback. No uploads, no server, models downloaded once after the user agrees and cached in Cache Storage. It works, but three things broke in ways I did not expect. None…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}