Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

Porting Moebius 0.2B image inpainting model to run in browser with Claude Code

Simon Willison used Claude Code to port the Moebius 0.2B image inpainting model from Python to JavaScript, enabling it to run directly in a web browser. The process involved converting model weights and rewriting the diffusion pipeline using Transformers.js and ONNX runtime. The resulting demo runs entirely client-side without any server infrastructure.

Background

- **Simon Willison** is a well-known Python developer, creator of the Datasette open-source tool, and a regular blogger about AI and web development. - **Moebius** (likely named after the French comic artist Jean "Moebius" Giraud) is a 0.2-billion-parameter image inpainting model — inpainting means filling in or replacing parts of an image based on a text prompt (e.g., removing an object or generating a new element in a photo). - **Claude Code** is an AI coding assistant (made by Anthropic) that can write, edit, and debug code conversationally inside a terminal. The blog post is about using Claude Code to help port this model so it runs entirely inside a web browser (via WebGPU/ONNX Runtime, likely), rather than requiring a Python server with a GPU. - **Why it matters:** Running AI image models entirely in-browser makes them free, private (no data sent to a server), and accessible to non-technical users. It also demonstrates a trend: using AI assistants to do the heavy lifting of porting other AI models to new environments.