Bonsai Image 4B 三值模型转换为 LiteRT 端侧文生图
原标题:litert-community/Bonsai-Image-ternary-4B
AI 摘要
PrismML 的 Bonsai Image 4B 是一个基于 FLUX.2-klein-4B 架构的三值权重扩散 Transformer,现已被转换为 LiteRT(原 TensorFlow Lite)格式,用于端侧文生图。整条流水线由三个固定形状的 .tflite 计算图组成,最小可用模型集为 3.97 GiB,在 iPhone 17 Pro 上约 64 秒生成一张 512×512 图像。三值权重在 int4 block-32 容器中被无损表示(取值为 -7、0、+7),量化后的低 PSNR 主要来自采样器漂移,而非质量退化。
正文节选
--- license: apache-2.0 base_model: prism-ml/bonsai-image-ternary-4B-unpacked pipeline_tag: text-to-image tags: - litert - tflite - on-device - ternary - flux2 base_model_relation: quantized --- LiteRT is Google's on-device runtime, the new name for TensorFlow Lite (Android: `com.google.ai.edge.litert:litert`), and `litert-torch`, the renamed `ai-edge-torch`, is its PyTorch converter: a PyTorch model converted unmodified with `litert_torch.convert` matched the original to 4e-7 on a Galaxy S26 (