fibo-8bit / README.md
lpalbou's picture
Update FIBO q8 validation metrics
e2c3dcb verified
---
base_model: briaai/FIBO
pipeline_tag: text-to-image
library_name: mlx-gen
license: other
license_name: bria-fibo
license_link: https://huggingface.co/briaai/FIBO
tags:
- mlx
- mlx-gen
- mflux
- apple-silicon
- 8-bit
- mixed-q8-bf16
- fibo
- text-to-image
---
# FIBO 8-bit for MLX-Gen
This repository contains MLX-Gen saved weights for [`briaai/FIBO`](https://huggingface.co/briaai/FIBO).
It is designed for local Apple Silicon inference with [`mlx-gen`](https://github.com/lpalbou/mlx-gen).
This is an MLX-Gen/mflux saved-weight folder, not a Diffusers or Transformers
`from_pretrained()` checkpoint.
## License and access
This checkpoint is a quantized derivative of the gated `briaai/FIBO` source model and follows the
source model's `bria-fibo` non-commercial license terms. Access to this derivative should require
users to accept the upstream FIBO terms before downloading the files.
## Capability
This package is for base FIBO text-to-image generation only.
FIBO Edit is a separate upstream model family and is not included in this package. Current MLX-Gen
public capability discovery intentionally does not expose FIBO Edit through unified `mlxgen generate`
until source-model and prepared-package edit validation pass.
## Quantization
This is a mixed q8/BF16 FIBO package:
- q8 for quantizable FIBO transformer and text-encoder linears.
- BF16 for the VAE.
- BF16 for FIBO conditioning, timestep, caption-projection, normalization, and output-projection
paths that are precision-sensitive in MLX-Gen.
## Validation
Measured on an Apple M5 Max with 128 GB unified memory using `mlx-gen 0.18.11`.
Prompt file: [`validation/fibo_seed103_prompt.json`](validation/fibo_seed103_prompt.json)
Settings: `width=512`, `height=512`, `steps=8`, `guidance=5`, `seed=103`.
| Package | Disk | Time | Max RSS | MAE vs source |
| --- | ---: | ---: | ---: | ---: |
| Source `briaai/FIBO` | 23.8 GiB cache | 15.13 s | 24.13 GB | baseline |
| This q8/BF16 package | 14.5 GiB | 16.45 s | 15.89 GB | 8.81 |
| q4/BF16 package | 10.2 GiB | 15.24 s | 11.39 GB | 17.56 |
![FIBO source, q8, and q4 validation](validation/fibo_base_q8_q4_seed103_contact_sheet.jpg)
Detailed validation notes: [`validation/fibo_base_q8_q4_seed103_metrics.md`](validation/fibo_base_q8_q4_seed103_metrics.md)
## Usage
```bash
python -m pip install -U mlx-gen
mlxgen download --model AbstractFramework/fibo-8bit
mlxgen generate \
--model AbstractFramework/fibo-8bit \
--prompt-file validation/fibo_seed103_prompt.json \
--width 512 \
--height 512 \
--steps 8 \
--guidance 5 \
--seed 103 \
--output fibo-q8.png
```
## Attribution
FIBO is published by Bria.ai. MLX-Gen is based on
[mflux](https://github.com/filipstrand/mflux) by Filip Strand and the original mflux contributors.
Quantized and contributed by [@lpalbou](https://huggingface.co/lpalbou).