Instructions to use prism-ml/bonsai-image-binary-4B-unpacked with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use prism-ml/bonsai-image-binary-4B-unpacked with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("prism-ml/bonsai-image-binary-4B-unpacked", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Bonsai Image · Binary 4B — Unpacked FP16 Safetensors
FP16 safetensors (HuggingFace diffusers format) of the 1-bit Bonsai Image 4B model. This repo exists for users who want to run Bonsai Image with stock diffusers or other frameworks that don't yet support our low-bit packs natively. The 1-bit kernels are currently in our forks of MLX and the gemlite low-bit GEMM stack — once they're broadly available, this unpacked version will no longer be needed.
We strongly recommend using the optimized low-bit packs instead. The 1-bit format is where the Bonsai Image gains come from — an 8.3× transformer footprint reduction, sub-iPhone deployment, and ~5× faster inference vs the stock FP16 pipeline on Apple Silicon. This unpacked FP16 version is full-size and provides none of those advantages.
For the optimized 1-bit release packs (recommended):
- bonsai-image-binary-4B-mlx-1bit — 1-bit MLX for Apple Silicon (Mac, iPhone, iPad)
- bonsai-image-binary-4B-gemlite-1bit — 1-bit gemlite/HQQ for NVIDIA GPUs (Linux + Windows)
For the higher-quality variant:
- bonsai-image-ternary-4B-unpacked — Ternary FP16 safetensors (and the matching MLX 2-bit + gemlite INT2 packs)
See the Bonsai Image Demo repo for one-command setup of either variant on Mac, Linux, or Windows.
- Downloads last month
- -