Porting the Moebius 0.2B image inpainting model to run in the browser with Claude Code
Simon Willison · Simon Willison · 2026-06-22
Simon Willison uses Claude Opus 4.8 via Claude Code to fully port the Moebius 0.2B image inpainting model from PyTorch/CUDA to a working browser application using ONNX and WebGPU, completing the project without reading any of the generated code.
Appears in
Extraction
Topics: vibe-codingbrowser-mlonnxwebgpucoding-agentsimage-inpainting
Claims
- Claude Opus 4.8 can autonomously convert a PyTorch model to ONNX, publish weights to Hugging Face, and build a complete browser-based UI.
- Chrome, Firefox, and Safari are all now capable of running a 0.2B parameter model entirely in the browser via WebGPU.
- The CacheStorage API can effectively cache ~1.3GB model weight files in the browser, preventing repeated large downloads.
- Vibe coding — delegating all code generation to an AI agent while the human only tests and redirects — is viable for non-trivial ML engineering tasks.
- Using parallel agent sessions for independent sub-tasks (one for main work, one for the side project) is a practical productivity pattern.
Key quotes
Claude Opus 4.8 is capable of converting a PyTorch model to ONNX, publishing the result to Hugging Face and then building out a web application and interface that can load and execute that model.
This definitely counts as vibe coding: I didn't look at a single line of code from the project, restricting my input to testing, suggesting small feature improvements (like a progress bar for the large file downloads) and pointing the model in the direction of examples of how I wanted things to work.
ONNX (Open Neural Network Exchange) is a portable, framework-neutral file format for neural networks... Crucially, ONNX describes what to compute, abstractly, without saying how or on what hardware.