FIBO 2.0 Edit Turbo MLX 4-bit โ€” Native Apple Silicon Studio

FIBO 2.0 Edit Turbo - 4-bit MLX Native for Apple Silicon

FIBO 2.0 Edit Turbo (4-bit MLX) is a high-efficiency Apple Silicon native port of Bria AI's FIBO 2.0 Edit Turbo using Apple's MLX framework. Native GUI support is available in DiffusionBear v0.4.2.

By quantizing the 44-layer DiT Transformer and the Qwen3-VL-4B-Instruct text encoder into 4-bit affine format (group_size=64, bits=4), the total package on disk is reduced from 24.3 GB down to ~7.3 GB, and runtime peak memory drops from 17.4 GB (which crashes or causes severe disk swap on 16 GB Macs) down to < 6.8 GB.

It runs 100% in RAM with ZERO SSD swap on Apple Silicon Macs with 16 GB unified memory.


โšก Empirical Benchmarks (Apple Silicon)

Memory Footprint & Compression

Component Original Precision (bf16) 4-bit MLX (group_size=64) Reduction
DiT Transformer (44 layers, dim 3584) 15.32 GB 4.26 GB -72.2%
Text Encoder (Qwen3-VL-4B-Instruct) 8.27 GB 2.88 GB -65.2%
VAE (FLUX.2 AutoencoderKL fp16) 0.34 GB 0.19 GB -44.1%
Total Disk Storage 24.3 GB 7.33 GB -69.8%
Runtime Peak VRAM 17.4 GB (OOM / Thrash) 6.8 GB Fits in 16 GB Unified RAM

Generation Latency (4 Turbo Steps)

Resolution Device Steps Cold Load (1st run) Steady State (warmed)
512 ร— 512 Apple M1 (16 GB) 4 ~73.9s ~58.8s (14.7s / step)
1024 ร— 1024 Apple M1 (16 GB) 4 ~331s ~303s (75.9s / step)
1024 ร— 1024 Apple M4 / M5 (projected) 4 ~35s ~25-30s (~7s / step)

๐Ÿš€ Quickstart & Standalone Usage

1. Requirements

Install standard Apple Silicon MLX requirements:

pip install mlx mlx-vlm transformers huggingface_hub pillow

2. Run Inference in One Command

A. Text-to-Image Generation (4 Turbo steps)

# Clone the repository
git clone https://huggingface.co/Ouinche/FIBO2-Edit-Turbo-MLX-4bit
cd FIBO2-Edit-Turbo-MLX-4bit

# Fast preview (512x512)
python fibo2_generate.py "a red vintage bicycle leaning against a whitewashed wall on a narrow street" --width 512 --height 512

# High quality 1024x1024
python fibo2_generate.py "a cinematic shot of a majestic snow leopard perched on a rocky mountain peak at sunset, golden hour light, highly detailed" --width 1024 --height 1024 --steps 4 --seed 4242

B. Multimodal Image Editing (Reference Image)

Modify an existing image by passing --image:

python fibo2_generate.py "replace the jacket with a red leather one" \
  --image portrait.png --width 768 --height 512 --steps 4

C. Masked Inpainting Edit (Precise Local Regeneration)

Regenerate only the painted area by passing a binary mask (white = region to regenerate, black = untouched):

python fibo2_generate.py "replace the suitcase with a vintage brown leather one" \
  --image suitcase.png \
  --mask suitcase_mask.png \
  --composite \
  --width 768 --height 512 --steps 4

Note: Under the hood, masked inpainting conforms to the official FIBO 2.0 specification: the masked area of the reference image is mapped to flat mid-grey (RGB 128, 128, 128) before Qwen3-VL and VAE latent encoding, guaranteeing clean scene understanding without artificial boundary artifacts.

D. Multi-Reference Composition (Up to 4 Images)

python fibo2_generate.py "a portrait of the character in <image_1> in the art style of <image_2>" \
  --images person.png painting.png --width 512 --height 768 --steps 4

๐Ÿง  Staged Execution Architecture

To guarantee zero memory thrashing on 16 GB Apple Silicon devices, fibo2_generate.py executes in three sequential stages with explicit cache clearing:

  1. Stage 1 (Text Encoder): Loads Qwen3-VL-4B-Instruct in 4-bit, extracts multi-layer hidden states (1, 6, L, 7680), and immediately evicts the text encoder from RAM.
  2. Stage 2 (Transformer Denoising): Loads the 4.26 GB 4-bit DiT Transformer, runs the 4-step Turbo schedule, and evicts the transformer from RAM.
  3. Stage 3 (FLUX.2 VAE Decode): Loads the lightweight 189 MB VAE decoder, decodes the latents into 24-bit RGB PIL image, and outputs PNG + JSON metadata.

๐Ÿ“„ License & Attribution

Citation

@article{gutflaish2025generating,
  title={Generating an Image From 1,000 Words: Enhancing Text-To-Image With Structured Captions},
  author={Gutflaish, Eyal and Kachlon, Eliran and Zisman, Hezi and Hacham, Tal and Sarid, Nimrod and Visheratin, Alexander and Huberman, Saar and Davidi, Gal and Bukchin, Guy and Goldberg, Kfir and others},
  journal={arXiv preprint arXiv:2511.06876},
  year={2025}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
MLX
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Ouinche/FIBO2-Edit-Turbo-MLX-4bit

Finetuned
(6)
this model

Paper for Ouinche/FIBO2-Edit-Turbo-MLX-4bit