Writing

Don't load a 6.2 GB model in every browser tab

Running a model in the browser is a good demo. It is a poor architecture once you have more than one lab. My first image labs each loaded the model inside the page, which meant a 6.2 GB model held in every tab that used it.

Model Runner is the fix. It is a small local service that holds models on my Mac and runs them on the GPU outside the browser, using ONNX Runtime's native WebGPU provider. Labs call it over HTTP. The weights are stored once, any browser can use them, and a model unloads after 30 idle minutes.

Architecture comparison showing three browser tabs duplicating a 6.2 GB model (18.6 GB total) on the left versus three tabs sharing one local HTTP Model Runner with a single 6.2 GB GPU weight copy and 30-minute idle unload on the right.
Sharing one local GPU weight copy over HTTP eliminates per-tab memory duplication.

It hosts model primitives rather than finished features. Today it has two models. Jeveration, the one-pass text-to-image model, exposes logits, decode, count, and generate. MiniT2I compact exposes generate and count. Adding a model means adding one file. A status page lists each model, loads and unloads it, and runs any operation directly.

The Model Runner status page. Provider: webgpu, one request at a time, and a model unloads after 30 idle minutes. The Models table lists Jeveration (Qwen3.5-4B with LoRA, int8 ONNX, about 6.3 GB, Not loaded) and MiniT2I compact (Mean Flow, 4 steps, int8 ONNX, about 0.3 GB, Ready, with a 3.8 second load time and 494 runs). A Run an op form sits below the table.
Labs call this one service. The weights stay here, outside the browser tab.

Why this matters beyond my own machine: the pattern separates the interface from the model. The lab page is free to focus on interaction and accessibility, and the model sits behind a plain HTTP boundary that several labs can share. MiniT2I Lab and the Jeveration labs both run through it.

Limits

This is a single-user local service, not a production server. I do not have a before-and-after timing, or a memory measurement, for moving the model out of the tab.

The labs that call it are on Projects.

Sources