Published by TokForge for on-device inference.
TokForge
- Website: https://tokforge.ai
- Discord: https://discord.gg/Acv3CBtfVm
- Google Play: https://play.google.com/store/apps/details?id=dev.tokforge
- iOS TestFlight: https://testflight.apple.com/join/jnufjzRr
Runs on-device in the TokForge app.
TokForge-Bonsai-Image-4B-GGUF
TokForge-packaged Bonsai Image 4B / FLUX.2 Klein bundle for on-device Android image generation.
This repository contains the runtime files used by the TokForge Android image-generation route:
bonsai_klein_official_tq2g128.gguf: TokForge/sd.cpp GGUF conversion of the Bonsai Image 4B diffusion transformer.Qwen3-4B-Q4_K_M.gguf: Qwen3-4B text encoder in GGUF Q4_K_M format.flux2-vae.safetensors: FLUX.2 Klein VAE, renamed for TokForge bundle discovery.
Attribution: Bonsai Image is by Prism ML. FLUX.2 Klein is by Black Forest Labs, and the text encoder is based on Qwen3-4B by Qwen/Alibaba Cloud. This repository changes the deployment packaging and runtime formats only.
Recommended TokForge Route
This is a guarded beta image-generation bundle, not a universal default for every Android phone.
| Device class | Route | Status |
|---|---|---|
| 16-24 GB Qualcomm/Adreno | 512x512, OpenCL, 2 steps | Quality Beta / Lab |
| 12-16 GB Qualcomm/Adreno | 512x512, OpenCL, 2-3 steps | Quality Beta / Lab after device proof |
| CPU, Tensor, Exynos, Mali, Xclipse | sub-512 or CPU preview | Preview only |
| Q8/OpenCL experiments | varies | Demoted until native quality is fixed |
TokForge uses conservative labels:
- Quality Beta requires coherent 512x512 output, repeatability, and no flat/corrupt image.
- Preview is used for sub-512, CPU, low-memory, or visibly soft/warped outputs.
- Lab is used for OpenCL/server paths that require explicit opt-in.
Inference Settings
The Bonsai route expects the published low-guidance FLUX.2 Klein/Bonsai-style recipe:
| Setting | Value |
|---|---|
| Sampler | Euler |
| Scheduler | simple / FlowMatch-style |
| CFG scale | 1.0 |
| Distilled guidance | 1.0 |
| Flow shift | 3.0 |
| Default canvas | 512x512 |
| Default quality steps | 2 on supported Adreno OpenCL |
Higher step counts are not automatically better. TokForge currently treats 1-step output as too smeared for Quality Beta.
Files
| File | Size | SHA-256 |
|---|---|---|
bonsai_klein_official_tq2g128.gguf |
1.3 GB | 2a6da84102513a3a14a955edeb84ef0e347b51f9f13cc539c939ea78410a3eb7 |
Qwen3-4B-Q4_K_M.gguf |
2.4 GB | 7485fe6f11af29433bc51cab58009521f205840f5b4ae3a32fa7f92e8534fdf5 |
flux2-vae.safetensors |
161 MB | ca70d2202afe6415bdbcb8793ba8cd99fd159cfe6192381504d6c4d3036e0f04 |
manifest.json |
metadata | Runtime recipe and route policy |
Usage with TokForge
This bundle is intended for TokForge, a free Android app for private on-device AI.
- Open TokForge.
- Go to Models or Image Creation settings.
- Download Bonsai Image 4B (TokForge).
- Use natural chat phrasing such as
generate an image of a red car on a city street, or use the image-generation chip/button path.
TokForge will unload/reload the chat model when needed on memory-constrained devices.
Validation Snapshot
TokForge fleet validation on 2026-05-31 found:
- RedMagic high-memory Adreno: 512x512/2 OpenCL Quality Beta passed the required prompt set.
- Lenovo 12-16 GB Adreno: 512x512/2 OpenCL Quality Beta passed with the normal one-shot helper.
- Tensor/Exynos/Mali/Xclipse and CPU routes remain Preview.
The sample contact sheet in samples/adreno_quality_beta_contact_sheet.png shows Adreno Quality Beta outputs for car, tree, restaurant, beach, house, and person prompts.
Limitations
- This is a runtime bundle, not a standard Diffusers training checkpoint.
- OpenCL acceleration is guarded and currently targeted at high-memory Qualcomm/Adreno devices.
- Non-Adreno GPU paths are not release-green.
- Low-memory CPU routes are Preview only.
- The output quality gate is visual/coherence-first; blurry or flat routes are demoted.
Credits
- Bonsai Image ternary 4B by Prism ML (Hugging Face). Used under the Apache-2.0 license. Created using Bonsai Image by Prism ML.
- Bonsai Image ternary 4B unpacked by Prism ML (Hugging Face). Used under the Apache-2.0 license.
- FLUX.2 [klein] 4B by Black Forest Labs (Hugging Face). Used under the Apache-2.0 license. The VAE file is byte-identical to its VAE.
- Qwen3-4B GGUF (text encoder) by the Qwen team (Alibaba Cloud) (Hugging Face). Used under the Apache-2.0 license.
Qwen3-4B-Q4_K_M.ggufis byte-identical to it. - Converted to GGUF with stable-diffusion.cpp by leejet (MIT).
Community
- Website: tokforge.ai