midudev/runonweb.ai
SDK to use local models on web easy
What it solves
Running AI models typically requires sending data to a server, which raises privacy concerns and adds latency and cost. This project solves that by offering a set of modular AI capabilities that execute directly in the browser, so nothing leaves the user's device. It also simplifies integration: each task is one import, and the underlying model is always open with a clear license.
How it works
The project provides a monorepo with two parts: a library (runonweb) and a demo website (packages/web). Each module corresponds to a single import, such as runonweb/stt for speech-to-text or runonweb/remove-bg for background removal. The library selects the best backend automatically: WebGPU when available, otherwise a WASM fallback. All computation happens locally. Models are downloaded from the Hugging Face Hub on first use, and each model keeps its own license. The website is built with Astro and deployed via Cloudflare Workers, and it includes live demos plus credits for every base model.
Who it's for
This is for web developers who want to add AI features like transcription, translation, image captioning, or depth estimation to their sites without standing up a backend server. It's also useful for anyone who cares about privacy, since all data stays on the device. The project is open source (MIT for code) and uses only models that permit redistribution and commercial use, so it's suitable for production applications.
Highlights
- Zero-privacy-leak: all inference runs locally; nothing is sent to a server.
- WebGPU first, WASM fallback: fast on modern GPUs, still works on older devices.
- Wide range of modules: speech-to-text, background removal, image captioning, depth estimation, object detection, OCR, text embedding, classification, translation, audio cleaning, emoji suggestion, and text-to-speech.
- All models are open: each demo page credits the base model, author, and license; code is MIT while models retain their own terms.
- Easy integration: one import per task, with a consistent API and automatic backend selection.
- Active research notes: the README documents real backend limitations and workarounds, making it easier to avoid pitfalls.
Related
- Project
- Project
- Project
- Project