PrismML's Bonsai Image 4B Runs Full Image Generation on iPhones at 0.93 GB

PrismML's Bonsai Image 4B squeezes a 4-billion-parameter diffusion model to under 1 GB, making on-device image generation on iPhone a reality for the first time.

·
·
PrismML's Bonsai Image 4B Runs Full Image Generation on iPhones at 0.93 GB
AuthorPrismML
Read6 min
  • First iPhone-class image model: Bonsai Image 4B is the first 4B-parameter diffusion model to run on-device on an iPhone.
  • Two variants: 1-bit (0.93 GB, 8.3x compression) for maximum footprint reduction; ternary (1.21 GB, 6.4x) for near-full quality at 95% of FLUX.2 Klein 4B.
  • Real speed gains: Generates a 512x512 image in ~6 seconds on M4 Pro Mac and ~9.4 seconds on iPhone 17 Pro Max, up to 5.6x faster than the full-precision pipeline.
  • Apache 2.0, open weights: Models available on Hugging Face in MLX (Apple Silicon) and Gemlite (CUDA) formats.
  • Bonsai Studio iOS app: Free iPhone app lets users run on-device image generation with no subscription or API calls.
  • Key limitation: Benchmarks are self-reported; the 1-bit model shows a more noticeable quality drop on complex multi-object compositions.

The prevailing assumption in image generation has been simple: if you want quality, you need a server. PrismML just made a serious case against that. The Pasadena-based startup, founded by Caltech researchers and backed by Khosla Ventures, has released Bonsai Image 4B, a family of compressed text-to-image models that run entirely on-device, from Apple Silicon Macs down to iPhones, with no API calls and no subscription required.

A gigabyte of image generation

The headline number is striking. The 1-bit variant compresses the diffusion transformer to 0.93 GB, an 8.3x reduction from the full-precision model. The ternary variant compresses it to 1.21 GB, a 6.4x reduction from the full-precision transformer. For context, the original FLUX.2 Klein 4B that Bonsai is built on requires a 7.75 GB diffusion transformer alone.

The two variants are designed for different priorities:

  • 1-bit Bonsai Image 4B uses binary weights {-1, +1} with an FP16 group-wise scaling factor, giving 1.125 effective bits per weight. It is the maximum-compression option, built for the tightest memory budgets.
  • Ternary Bonsai Image 4B uses weights {-1, 0, +1} with FP16 group-wise scaling, giving 1.71 effective bits per weight. The extra zero state adds representational flexibility, recovering visual quality and prompt fidelity at the cost of a slightly larger footprint.

How it actually works

Quantization, the process of replacing high-precision floating-point weights with lower-precision representations, is not new. INT8 and INT4 quantization are standard tools. But 1-bit quantization is an entirely different level of aggression: every weight in the transformer is reduced to just two possible values. Instead of preserving exact precision, the model preserves structure. And surprisingly, diffusion transformers seem capable of surviving that tradeoff much better than people expected.

Bonsai Image 4B is built from the FLUX.2 Klein 4B. It keeps the architecture intact but changes how the transformer weights are represented. By moving those weights into binary and ternary form, Bonsai reduces the part of the image pipeline that matters most for local deployment. Critically, a small set of precision-sensitive supporting tensors (~5%), called the projection layers, remains in FP16, so the final 1-bit Bonsai Image 4B transformer is 0.93 GB: an 8.3x reduction from the 7.75 GB full-precision FLUX.2 Klein 4B.

The inference stack matters as much as the compression. One reason low-bit AI models often fail is because hardware and kernels are not optimized for them. Without optimized kernels, these tiny representations would become slow or unusable. Gemlite allows the model to actually run efficiently on consumer hardware. On Apple Silicon, PrismML uses MLX low-bit paths; on CUDA, they use Gemlite low-bit GEMM kernels (matrix multiplication routines tuned for these exotic weight formats).

The memory math that unlocks the iPhone

For a 4B-class image model, the diffusion transformer is the largest part of the model and the part that runs repeatedly during generation. Each denoising step invokes the transformer again, so transformer size directly shapes memory pressure, bandwidth demand, and local inference speed. This is why compression of the transformer specifically is the key lever for on-device deployment.

The full deployment payload, including the compressed text encoder and FP16 VAE (the component that decodes the latent representation into a final image), is 3.42 GB for the 1-bit model and 3.88 GB for the ternary model. The full-precision FLUX.2 Klein 4B requires 15.97 GB. This reduction makes Bonsai Image 4B the first image model in its parameter class to run directly on the iPhone.

Speed and quality on real hardware

It generates a 512x512 image in 6 seconds on an M4 Pro Mac and 9.4 seconds on an iPhone 17 Pro Max, while keeping ~95% of full-precision quality. That speed advantage comes from more than just the smaller model size: the compressed weights require less memory bandwidth on every denoising step, which compounds across the 20-50 steps a typical generation takes.

On benchmarks, the results hold up:

  • GenEval (object composition and attribute binding): Ternary scores 0.723 vs. 0.819 for full-precision FLUX.2 Klein 4B
  • HPSv3 (human preference and aesthetic quality): Ternary scores 12.22 vs. 12.84
  • DPG-Bench (dense prompt following): Ternary scores 0.851 vs. 0.853, nearly identical

Ternary Bonsai Image 4B is the quality-oriented variant. At 1.21 GB, it retains 95% of the FLUX.2 Klein 4B accuracy across GenEval, HPSv3, and DPG-Bench, while reducing the diffusion transformer footprint by 6.4x. The comparison against other small models is equally telling: SDXL at 5.14 GB scores only 67% of full-precision quality, and BK-SDM-Small at 0.98 GB scores just 42%. Together, the Bonsai Image variants move the quality-footprint frontier: they bring modern diffusion-transformer behavior into a memory range previously occupied by much smaller, lower-capability models.

Where the quality gap shows up

The benchmarks are self-reported, and some observers have noted this. The company says the compressed models hold up to 95% of the original quality, though that figure is self-reported with no independent benchmark behind it yet. The 1-bit model's GenEval score of 0.671 versus 0.819 for the full-precision model is a meaningful gap in complex multi-object compositions. If your use case involves intricate scenes with precise attribute binding (e.g., "a red cube to the left of a blue sphere on a wooden table"), the 1-bit variant will show more degradation than the ternary one. For simpler prompts and aesthetic generation, the gap is much harder to see.

Why this matters beyond the demo

The deeper argument here is about the economics of the creative loop. Image generation is inherently iterative: users revise prompts, compare outputs, and generate variations. When every attempt is a cloud API call, that loop has friction and cost baked in. Local inference removes both.

The "diffusion needs a GPU" assumption is breaking. Until now, builders shipping image generation in a product had two real options: call OpenAI / Stability / Gemini Imagen APIs at per-image pricing, or self-host a large model on GPU infrastructure. Bonsai Image 4B opens a third path: ship the model with the app.

The practical use cases this unlocks:

  • Privacy-first creative tools: prompts and generated images never leave the device
  • Offline-capable apps: image generation with no network dependency
  • Zero marginal cost generation: no per-image API fees once the model is on-device
  • Low-latency product integrations: no round-trip to a server on every generation step
  • Edge serving: small-scale inference servers where GPU costs are prohibitive

Getting started

Both 1-bit and Ternary Bonsai Image 4B are released with open weights and code under the Apache 2.0 license. With this launch, PrismML is also introducing Bonsai Studio, its iOS app for trying Bonsai Image 4B directly on iPhone. The model weights are on Hugging Face in four formats: MLX 1-bit and 2-bit for Apple Silicon, and Gemlite 1-bit and 2-bit for CUDA. There is also a WebGPU demo that runs in-browser, and the full demo code is on GitHub.

PrismML's prior work was in 1-bit and ternary language models. Extending that compression philosophy to diffusion transformers, and making it work at a quality level that competes with models 6-8x larger, is a meaningful step. The field has generally assumed that image generation requires more numerical precision than language modeling. Bonsai Image 4B is a direct challenge to that assumption, and the benchmarks, even self-reported, make it hard to dismiss.

Comments

avatar