Skip to main content
WebGPU / WASM / On-Device AI•Nov 2025 — Dec 2025Open Source

Inori Studio

Browser image editor running background removal and inpainting on-device via WebGPU and WebAssembly.

Interactive Preview
Inori Studio [On-Device AI]
WebGPU / WASM Local
Original Image
Processed (WebGPU)Local Inference
‹›
Original
Processed
Context

Overview

Inori Studio is a client-side creative image editor that runs background removal and inpainting models entirely in the browser without server GPU infrastructure. By combining WebGPU compute shaders and WebAssembly Web Workers via ONNX Runtime Web, image processing executes locally on consumer hardware with zero network transfer latency and complete data privacy.

Key Features

  • Background removal with WebGPU compute shaders running locally on the GPU
  • Object inpainting using the LaMa ONNX model running inside a background Web Worker
  • Model weight caching with the browser Cache Storage API to avoid re-downloading on return visits
  • Interactive canvas editor built with Konva.js supporting custom brush sizes and undo/redo history
  • Batch export mode for processing and downloading multiple images in a zip file
Impact

Outcomes

Image Uploads0 bytes
Background Removal~2s on consumer GPU
Inpainting Inference512x512 crops
Process

How It Works

1

Subject Isolation (WebGPU)

Passes image data into WebGPU compute shaders to generate high-resolution foreground masks in milliseconds.

2

Worker Inpainting (LaMa)

Transfers mask coordinates and cropped bounding boxes to a background Web Worker running the LaMa neural model.

3

Local Weight Storage

Streams model weights on first run, shows progress, and caches the model file in browser Cache Storage.

Screenshots & Interface

Visual Captures

[Screenshot Placeholder]
Alt: "Inori Studio background removal before and after"
Suggested capture: Canvas editor showing the original uploaded image on the left and the processed transparent cutout on the right.
[Screenshot Placeholder]
Alt: "Inori Studio object inpainting brush tool"
Suggested capture: Interactive canvas with a masked object being inpainted using the custom brush.
Decisions

Technical Choices & Trade-offs

Running LaMa on WebAssembly instead of WebGPU

Decision: Execute the LaMa inpainting model on WASM inside a Web Worker rather than WebGPU shaders.
Why: Fast Fourier Convolution (FFC) operations in the LaMa model had shader compilation issues across certain browser GPUs. Moving it to a WASM CPU worker resolved shader crashes while keeping the UI completely smooth.

Bounding box tensor cropping

Decision: Crop only the masked area with padding and letterbox it to 512x512 before tensor inference.
Why: Resizing entire 4K images into model tensors caused memory spikes and slow inference. Cropping just the bounding box kept memory usage tiny and processing fast.
Stack

Technologies Used

Languages & Core
TypeScriptWebGPUWebAssembly (WASM)
Backend & Data
Web WorkersCache Storage API
Frontend & UI
React 19Next.js 16Konva.jsTailwind CSS
AI & Vision
ONNX Runtime WebLaMa Inpainting (ONNX)rembg-webgpu