Porting Moebius Image Model to Browser with Claude Code
- •Simon Willison ported the 0.2B Moebius image inpainting model to run entirely in web browsers.
- •The project utilized Claude Code to convert PyTorch models to ONNX and handle browser-based execution.
- •The 1.24GB model runs in Chrome, Firefox, and Safari using WebGPU and the CacheStorage API.
On June 22, 2026, software developer Simon Willison successfully ported the Moebius 0.2B image inpainting model—a tool designed to fill gaps in images—to run directly in web browsers using WebGPU. Originally requiring PyTorch and NVIDIA CUDA, the model was converted to the ONNX (Open Neural Network Exchange) format to enable client-side execution. The project was completed using Claude Code, an AI coding agent, as part of a "vibe coding" workflow where the developer directed the agent's tasks without writing manual code.
The process involved utilizing Claude Code to perform research, clone the Moebius repository and weights from Hugging Face, and iteratively build a web interface. The agent converted the model weights into 1.24GB of ONNX files and published them to a Hugging Face repository. To address performance issues related to the large file size, the agent implemented the CacheStorage API to cache the ~1.3GB model data locally in the browser, allowing the application to function efficiently upon subsequent loads.
Testing confirmed the tool is compatible with Chrome, Firefox, and Safari. The final application serves as a client-only web interface where users can upload images, highlight regions for removal, and execute inpainting locally. This effort demonstrated the capability of Claude Opus 4.8 to manage complex technical workflows, including model conversion, repository management, and web application deployment, without human intervention in the underlying source code. The project underscores the feasibility of running large AI models directly within browser environments using modern web standards.