Add model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: stabilityai-non-commercial
|
| 4 |
+
license_link: https://huggingface.co/stabilityai/sd-turbo
|
| 5 |
+
pipeline_tag: text-to-image
|
| 6 |
+
base_model: stabilityai/sd-turbo
|
| 7 |
+
tags:
|
| 8 |
+
- android
|
| 9 |
+
- webgpu
|
| 10 |
+
- on-device
|
| 11 |
+
- text-to-image
|
| 12 |
+
- image-to-image
|
| 13 |
+
- onnxruntime-web
|
| 14 |
+
- sd-turbo
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# Bonsai Image
|
| 18 |
+
|
| 19 |
+
On-device AI image generation for Android. A single APK that runs a diffusion
|
| 20 |
+
model **entirely on your phone's GPU** via WebGPU — no accounts, no servers, no cloud.
|
| 21 |
+
|
| 22 |
+
This repo hosts the **all-inclusive APK** (~2.5 GB, model bundled inside) because
|
| 23 |
+
it's over GitHub's 2 GB release-asset limit.
|
| 24 |
+
|
| 25 |
+
## Download
|
| 26 |
+
|
| 27 |
+
**[⬇️ Bonsai-Image.apk](https://huggingface.co/alphastack1/bonsai-image/resolve/main/Bonsai-Image.apk)** (~2.5 GB)
|
| 28 |
+
|
| 29 |
+
1. Enable **Install from unknown sources** on your Android device.
|
| 30 |
+
2. Download and open the APK.
|
| 31 |
+
3. Type a prompt (or attach a photo for image-to-image) and tap **Generate**.
|
| 32 |
+
|
| 33 |
+
## Requirements
|
| 34 |
+
|
| 35 |
+
- **Android 12+** with a recent **Android System WebView / Chrome (121+)**
|
| 36 |
+
- A **Qualcomm Adreno** or **ARM Mali** GPU (most modern phones)
|
| 37 |
+
- ~3 GB free storage
|
| 38 |
+
- WebGPU support in the system WebView — the app reports this in **Settings → Device**
|
| 39 |
+
|
| 40 |
+
## How it works
|
| 41 |
+
|
| 42 |
+
| Layer | Detail |
|
| 43 |
+
|---|---|
|
| 44 |
+
| UI | Single-file WebView app, dark theme, on-device history (localStorage) |
|
| 45 |
+
| Engine | [SD-Turbo](https://huggingface.co/stabilityai/sd-turbo) via `onnxruntime-web` on the **WebGPU** execution provider |
|
| 46 |
+
| Model | fp16 ONNX (text encoder + UNet + VAE), **bundled in the APK** |
|
| 47 |
+
| Tokenizer | CLIP, via `@xenova/transformers` |
|
| 48 |
+
|
| 49 |
+
Generation runs locally. First launch fetches a small (~25 MB) GPU runtime once,
|
| 50 |
+
then it's fully on-device.
|
| 51 |
+
|
| 52 |
+
## Status — experimental
|
| 53 |
+
|
| 54 |
+
This is an early build. The current engine is **SD-Turbo**, used as a working
|
| 55 |
+
stand-in. PrismML's **Bonsai 1-bit/ternary image model** (a 1-bit quantization of
|
| 56 |
+
FLUX.2 Klein) has no Android/WebGPU runtime yet; when one ships, it drops into the
|
| 57 |
+
same engine slot and the app around it stays identical.
|
| 58 |
+
|
| 59 |
+
Installs **alongside** the separate [Bonsai LLM](https://github.com/alphastack1/storage/releases)
|
| 60 |
+
text app — different package, violet icon.
|
| 61 |
+
|
| 62 |
+
## License
|
| 63 |
+
|
| 64 |
+
The bundled SD-Turbo weights are governed by the **Stability AI Non-Commercial
|
| 65 |
+
Research Community License** (see [SD-Turbo](https://huggingface.co/stabilityai/sd-turbo)).
|
| 66 |
+
**Non-commercial use only.**
|