Image generation
Imagine
Generate images from a text prompt entirely in the tab. Bonsai Image 4B runs on WebGPU. No API key, no upload, nothing leaves the device after the first download.
Try Imagine
Runs in this tab · nothing uploaded
What it does
A picture from a sentence. On your GPU.
- Bonsai Image 4B (Prism ML, 2026) is a 1-bit / 1.58-bit FLUX.2 Klein deployment. WebGPU only. There is no WASM path.
- Default
binaryis the smaller payload (~3.4 GB). Passsize: "ternary"(~3.9 GB) for the quality-oriented weights. - Tuned for 4 FlowMatch-Euler steps at guidance 1.0. More steps rarely help and can add artifacts. Negative prompts are not used.
- Default output is 512×512. Native training resolution is 1024×1024; sides must be multiples of 16 (32 recommended).
- First download is several gigabytes and is cached in IndexedDB. Chromium + a recent GPU is required.
Specifications
- Package
- runonweb/image
- License
- Apache-2.0
- Download
- ~3.4 GB (binary)ternary ~3.9 GB
- Quantization
- 1-bit / 1.58-bit on WebGPU
- Backend
- WebGPU only
- Input
- Text
Get started with runonweb/image
pnpm add runonwebrunonweb/imagets
import { ImageGenerator } from 'runonweb/image'
const gen = new ImageGenerator({ size: 'binary' })
await gen.load()
const { image, seed } = await gen.generate(
'A bonsai tree in a quiet ceramic studio, soft morning light',
)
document.querySelector('img').src = URL.createObjectURL(image)
gen.dispose()Same shape everywhere: construct, load(), run, dispose(). Pass onProgressto show download progress on first use.
Questions about Imagine
Does Imagine run on device?
Yes. Weights download once and stay in the browser. Nothing is sent to a server.
What does Imagine cost?
Nothing. runonweb is free and MIT-licensed, with no device limits, tokens or sign-in.
Which browsers support Imagine?
A Chromium browser with WebGPU and a recent GPU. This model has no WebAssembly fallback.
Can I use a different model with runonweb/image?
Yes. See each module’s docs for the options it accepts (model, size, language…). Check the license and test both backends before shipping.