Quantization & Engine
Output Spec
Weights & Recipe
1024x1024Pomavia Lab
4 steps · M5 Ultra
≥ 24 GB
3.66s
● 72.0%
Near-Peak
30.0 GB
1.56×
BF16
diffusers 0.43.0 + torch 2.15.0 (MPS) · @hiddendevj
1024x1024Pomavia Lab
4 steps · M5 Ultra
≥ 64 GB
3.45s
● 83.0%
Compute Peak
50.0 GB
—
Optimization history — 1024×1024 4-Step Generation Time (Lower = Better)
Compatible Apple Silicon Macs
✓ Mac mini / MacBook Air (M4) (24G)✓ Mac mini / MBP 14″ / iMac (M6) (32G)✓ Mac mini / MBP (M5 Pro) (64G)✓ Mac Studio / MBP (M5 Max) (128G)✓ Mac Studio / Mac Pro (M2 Ultra) (192G)✓ Mac Studio (M3 Ultra) (256G)✓ Mac Studio (M5 Ultra · 256 GB) (256G)✓ Mac Studio (M5 Ultra · 512 GB) (512G)
Weights & verified launch recipes
MLX 8-bit — black-forest-labs/FLUX.2-klein-9B ↗
python models/image/flux2-klein-4b/run.py --model-path /path/to/FLUX.2-klein-9B --base-model flux2-klein-9b -q 8 --warmup --steps 4 --width 1024 --height 1024
python -c "import torch; from diffusers import DiffusionPipeline; p=DiffusionPipeline.from_pretrained('/path/to/FLUX.2-klein-9B', torch_dtype=torch.bfloat16).to('mps'); p('...', num_inference_steps=4, guidance_scale=1.0).images[0].save('out.png')"
⚡ Hardware roofline · compute efficiency (DiT TFLOPS)
η_FLOPs = sustained TFLOPS / chip peak BF16 tensor TFLOPS · ≥75% = compute roofline MLX 8-bit (mflux 0.24.0 Resident Warm (MLX 0.32.5))
● 72.0% · Near-Peak Sustained 99.4 TFLOPS / 138 TFLOPS peak (mflux 0.24.0 Resident Warm (MLX 0.32.5))
Compute-bound DiT evaluated against Metal BF16 tensor core ceiling.
BF16 (diffusers 0.43.0 + torch 2.15.0 (MPS))
● 83.0% · Compute Peak Sustained 114.5 TFLOPS / 138 TFLOPS peak (diffusers 0.43.0 + torch 2.15.0 (MPS))
9B DiT warm PyTorch MPS BF16 sustains 114.5 TFLOPS (83.0% Compute Roofline) at 50 GB Wired.
📋 Per-Mac dated & verifiable optimization logs
Mac Studio · Apple M5 Ultra (36c CPU / 80c GPU · 256 GB) · macOS 27.2 (26B123) · sysctl iogpu.wired_limit_mb=249036 · 2 TB NVMe (11.18 GB/s)
Pomavia Lab verified log | Date & stage | Engine & quant | Optimization / ablation parameters | Measured speed | Wired RAM & NVMe I/O | Verification & repro |
|---|---|---|---|---|---|
2026-12-03 Baseline | mflux 0.24.0 CLI · BF16 / 8-bit | Single-shot CLI invocation (includes model load + Metal JIT every image) | 9.0s BF16 Cold · 5.70s 8-bit Cold 20.3s @ 2048×2048 | 20.03 GB MLX · 30.0 GB Wired | 4-bit tested (5.6s, garbles text ❌) |
2026-12-05 Warm MPS | diffusers 0.43.0 + torch 2.15.0 (MPS) | Resident PyTorch MPS BF16 pipeline (1024² & 2048², 4 steps) | 3.45s Warm 1K · 17.46s Warm 2K 8.9s initial load · 0.862s/step | 50.0 GB Wired @ 1K · 117.7 GB @ 2K | Crisp English typography ✅ |
2026-12-06 Optimal ★ | mflux 0.24.0 · Resident MLX 8-bit | In-process warm MLX 8-bit (eliminates per-image CLI load & Metal JIT) | 3.66s Warm 1K · 17.90s Warm 2K 0.32s load · -35.8% vs Cold CLI | 20.0–27.3 GB MLX (4.3x less RAM than MPS @ 2K!) | Zero NaN · Matches BF16 (std=63.5) ✅ |
Mac Studio (M5 Ultra · 512 GB) (512 GB · 1228 GB/s) · ≈ 3.7s (1024x1024)
Roofline-sized · awaiting lab PR This Mac has the native M5/M6 Neural GPU matrix path — keep the M5 QxA8 (min_tokens=64) recipe enabled.
sudo sysctl iogpu.wired_limit_mb=486400 iogpu.wired_lwm_mb=465920 Mac Studio (M3 Ultra) (256 GB · 819 GB/s) · ≈ 11.1s (1024x1024)
Roofline-sized · awaiting lab PR Note: M2/M3/M4 chips lack the native M5 QxA8 unit — set a8_prefill_enabled=false (use native A16 GPU or calibrated Dual-ANE prefill).
sudo sysctl iogpu.wired_limit_mb=243200 iogpu.wired_lwm_mb=232960 Mac Studio / Mac Pro (M2 Ultra) (192 GB · 800 GB/s) · ≈ 15.3s (1024x1024)
Roofline-sized · awaiting lab PR Note: M2/M3/M4 chips lack the native M5 QxA8 unit — set a8_prefill_enabled=false (use native A16 GPU or calibrated Dual-ANE prefill).
sudo sysctl iogpu.wired_limit_mb=182400 iogpu.wired_lwm_mb=174720 Mac Studio / MBP (M5 Max) (128 GB · 614 GB/s) · ≈ 7.3s (1024x1024)
Roofline-sized · awaiting lab PR This Mac has the native M5/M6 Neural GPU matrix path — keep the M5 QxA8 (min_tokens=64) recipe enabled.
sudo sysctl iogpu.wired_limit_mb=121600 iogpu.wired_lwm_mb=116480 Mac mini / MBP (M5 Pro) (64 GB · 307 GB/s) · ≈ 14.6s (1024x1024)
Roofline-sized · awaiting lab PR This Mac has the native M5/M6 Neural GPU matrix path — keep the M5 QxA8 (min_tokens=64) recipe enabled.
sudo sysctl iogpu.wired_limit_mb=60800 iogpu.wired_lwm_mb=58240 Mac mini / MBP 14″ / iMac (M6) (32 GB · 170 GB/s) · ≈ 23.6s (1024x1024)
Roofline-sized · awaiting lab PR This Mac has the native M5/M6 Neural GPU matrix path — keep the M5 QxA8 (min_tokens=64) recipe enabled.
sudo sysctl iogpu.wired_limit_mb=28160 iogpu.wired_lwm_mb=26560 Mac mini / MacBook Air (M4) (24 GB · 120 GB/s) · ≈ 56.3s (1024x1024)
Roofline-sized · awaiting lab PR Note: M2/M3/M4 chips lack the native M5 QxA8 unit — set a8_prefill_enabled=false (use native A16 GPU or calibrated Dual-ANE prefill).
sudo sysctl iogpu.wired_limit_mb=21120 iogpu.wired_lwm_mb=19920