DiffusionBear
Apple Silicon M1 · Compute Precision A/B

FP16 Compute Acceleration vs BF16 Default

Controlled side-by-side measurements on an Apple M1 (16 GB unified memory) comparing DiffusionBear's default bfloat16 precision against optional float16 compute across 13 warm MLX runs — including wall-clock speed, RSS memory delta, SSIM, PSNR, and full-size contact sheets.

-67.9%
Fastest speedup measured: Qwen-Image 2.1 Turbo (2s) drops from 108.59 s to 34.88 s.
-1,669 MB
Largest measured RSS drop: FLUX.2-klein 4B (txt2img) falls from 5,113.5 MB to 3,444.5 MB.
0.9991 SSIM
Highest visual parity: Bria FIBO 2.0 Edit Turbo (ref) at 48.32 dB PSNR while running 24.6% faster.
12 / 13
Measured configs faster in FP16 (-10.4% to -67.9%); only FLUX.2-klein 4B (ref) was +12.3% slower.

Why FP16 Accelerates Apple M1 (While BF16 Remains Default)

Modern diffusion models are trained and published in bfloat16 (Brain Float 16). On Apple M2 and newer chips, Metal includes native hardware bfloat16 ALU instructions. On the original Apple M1, however, hardware bfloat16 ALUs are absent — MLX and Metal must emulate bfloat16 operations via float32 promotion and conversion, adding latency and temporary buffer pressure.

BF16 Default · Exact Native Render

Uses an 8-bit exponent (same dynamic range as FP32) and 7-bit mantissa. Matches upstream PyTorch and mflux reference weights without exponent clipping, making it the safest default for maximum fidelity across every model and prompt.

FP16 Fast Compute · M1 Native ALU

Executes natively on M1's hardware FP16 ALUs with a 5-bit exponent and 10-bit mantissa. Across 12 of 13 tested configurations it cuts generation time by 10.4% to 67.9% and reduces peak RSS on heavy models, with high structural parity (SSIM 0.96–0.999 on FLUX/FIBO/MOSS 4s) and minor seed-sensitivity drift on a few sensitive schedules.

Measured BF16 vs FP16 Benchmark Results (M1 16 GB)

All 13 runs below come directly from controlled A/B benchmark sweeps on an Apple M1 (16 GB unified memory), matching seed, prompt, steps, and resolution between BF16 and FP16. Memory cells marked — were not recorded in that sweep.

Model & Mode Steps BF16 (s) FP16 (s) Speed Delta BF16 RAM FP16 RAM RAM Delta SSIM PSNR
Qwen-Image 2.1 Turbotxt2img (DMD2) 2 108.59 s 34.88 s -67.9% — — — 0.8942 23.73 dB
MOSS-Image SFT 5Btxt2img (4s DMD) 4 78.76 s 48.03 s -39.0% — — — 0.9885 35.95 dB
Kromoss 5Btxt2img (8s DMD2) 8 139.76 s 94.82 s -32.2% — — — 0.8945 23.16 dB
FLUX.2-klein 4Btxt2img 4 49.85 s 34.91 s -30.0% 5,113.5 MB 3,444.5 MB -1,669.0 MB 0.9613 27.99 dB
FLUX.2-klein 9Breference image 4 351.90 s 255.98 s -27.3% 2,844.6 MB 1,623.8 MB -1,220.8 MB 0.9604 31.29 dB
FLUX.3-klein 5.6Breference image 4 206.52 s 155.17 s -24.9% 2,082.5 MB 2,043.9 MB -38.6 MB 0.9802 34.66 dB
Bria FIBO 2.0 Edit Turboreference image 4 202.28 s 152.50 s -24.6% — — — 0.9991 48.32 dB
FLUX.3-klein 5.6Btxt2img 4 55.00 s 42.54 s -22.7% 5,472.2 MB 5,637.8 MB +165.6 MB 0.9154 26.56 dB
Krea 2 Turbo 13Btxt2img 4 248.71 s 202.36 s -18.6% 2,259.3 MB 1,407.5 MB -851.8 MB 0.7247 18.96 dB
FLUX.2-klein 9Btxt2img 4 101.34 s 83.60 s -17.5% 1,418.8 MB 1,435.4 MB +16.6 MB 0.9234 25.11 dB
FLUX.2-klein 9B (Pruned 5.1B Q4 TE)reference image · HF repo 4 377.48 s 282.61 s -25.1% 2,580.2 MB 1,611.1 MB -969.1 MB 0.9696 31.87 dB
FLUX.2-klein 9B (Pruned 5.1B Q4 TE)txt2img · -15.4% TE peak RAM 4 108.77 s 87.63 s -19.4% 1,245.4 MB 1,318.1 MB +72.7 MB 0.8649 22.07 dB
MOSS-Image SFT 5Btxt2img (8s DMD) 8 118.78 s 102.00 s -14.1% — — — 0.7076 18.02 dB
Bria FIBO 2.0 Edit Turbotxt2img 4 95.22 s 85.30 s -10.4% — — — 0.9986 45.27 dB
FLUX.2-klein 4Breference image 4 152.88 s 171.70 s +12.3% 2,622.0 MB 2,636.2 MB +14.2 MB 0.9896 37.26 dB

Interactive Visual Comparison Sliders (BF16 vs FP16)

Drag the divider across any pair below — generated locally on Apple M1 (16 GB) with identical seed and prompt: BF16 (Default) on the left, FP16 (Fast) on the right (and Full 8B vs Pruned 5.1B Q4 TE on the two FLUX.2-9B encoder comparisons).

FLUX.2-klein 4B txt2img FP16 output FP16 · 58.31 s FLUX.2-klein 4B txt2img BF16 output BF16 · 83.27 s
FLUX.2-klein 4B (txt2img, 4 steps) — 30.0% faster and 1,669 MB lower RSS. SSIM 0.9613 · PSNR 27.99 dB
FLUX.2-klein 9B reference FP16 output FP16 · 255.98 s FLUX.2-klein 9B reference BF16 output BF16 · 351.90 s
FLUX.2-klein 9B (reference, 4 steps) — 27.3% faster (saving 95.9 s) and 1,220.8 MB lower RSS. SSIM 0.9604 · PSNR 31.29 dB
FLUX.2-klein 9B Pruned 5.1B Q4 TE FP16 reference output Pruned 5.1B Q4 · 282.61 s FLUX.2-klein 9B Full 8B TE FP16 reference output Full 8B TE · 255.98 s
FLUX.2-klein 9B — Full 8B vs Pruned 5.1B Q4 TE (ref, FP16) — 2.57 GiB (-73%), -15.4% TE peak MLX RAM. BF16↔FP16 SSIM 0.9696 · 31.87 dB
FLUX.2-klein 9B Pruned 5.1B Q4 TE FP16 txt2img output Pruned 5.1B Q4 · 87.63 s FLUX.2-klein 9B Full 8B TE FP16 txt2img output Full 8B TE · 83.60 s
FLUX.2-klein 9B — Full 8B vs Pruned 5.1B Q4 TE (txt2img, FP16) — -14.4% TE peak MLX RAM, FP16 -19.4% faster. BF16↔FP16 SSIM 0.8649 · 22.07 dB
FLUX.3-klein 5.6B reference FP16 output FP16 · 131.65 s FLUX.3-klein 5.6B reference BF16 output BF16 · 175.34 s
FLUX.3-klein 5.6B (reference, 4 steps) — 24.9% faster with virtually identical composition. SSIM 0.9802 · PSNR 34.66 dB
Bria FIBO 2.0 Edit Turbo reference FP16 output FP16 · 90.06 s Bria FIBO 2.0 Edit Turbo reference BF16 output BF16 · 119.37 s
Bria FIBO 2.0 Edit Turbo (reference, 4 steps) — Near-bit-exact visual parity at 24.6% lower latency. SSIM 0.9991 · PSNR 48.32 dB
Qwen-Image 2.1 Turbo 2-step FP16 output FP16 · 34.88 s Qwen-Image 2.1 Turbo 2-step BF16 output BF16 · 108.59 s
Qwen-Image 2.1 Turbo (2 steps DMD2) — Largest speedup (-67.9%, 108.59 s → 34.88 s). SSIM 0.8942 · PSNR 23.73 dB
MOSS-Image SFT 5B 4-step FP16 output FP16 · 65.50 s MOSS-Image SFT 5B 4-step BF16 output BF16 · 107.40 s
MOSS-Image SFT 5B (4 steps DMD) — 39.0% faster with clean 0.9885 SSIM parity. SSIM 0.9885 · PSNR 35.95 dB
Kromoss 5B 8-step FP16 output FP16 · 94.82 s Kromoss 5B 8-step BF16 output BF16 · 139.76 s
Kromoss 5B (8 steps DMD2) — 32.2% faster (139.76 s → 94.82 s) with minor texture variation. SSIM 0.8945 · PSNR 23.16 dB
Krea 2 Turbo 13B 4-step FP16 output FP16 · 202.36 s Krea 2 Turbo 13B 4-step BF16 output BF16 · 248.71 s
Krea 2 Turbo 13B (4 steps) — 18.6% faster and 851.8 MB lower RSS, with 13B composition shift in FP16. SSIM 0.7247 · PSNR 18.96 dB
FLUX.3-klein 1024x1024 Row-Strip VAE ON output Strip ON · 1,443 MB FLUX.3-klein 1024x1024 Row-Strip VAE OFF output Strip OFF · 8,144 MB
Row-Strip VAE Decode (FLUX.3 5.6B, 1024×1024, FP16) — -82.3% VAE MLX peak (8,144 → 1,443 MB), zero tile seams. SSIM 0.9978 · PSNR 45.84 dB
Qwen-Image 2.1 25-step StepCache ON output StepCache ON · 261.87 s Qwen-Image 2.1 25-step StepCache OFF output StepCache OFF · 398.98 s
Qwen-Image 2.1 StepCache (25 steps, FP16) — 34.4% faster (-137.1 s saved) with near-identical fine detail. SSIM 0.9835 · PSNR 32.12 dB
Qwen-Image 2.1 40-step StepCache ON output StepCache ON · 371.39 s Qwen-Image 2.1 40-step StepCache OFF output StepCache OFF · 548.74 s
Qwen-Image 2.1 StepCache (40 steps, FP16) — 32.3% faster (-177.4 s saved; faster than 25 steps without cache). SSIM 0.9885 · PSNR 34.97 dB

v0.5.2 Engine Toggles & Memory Optimizations

Alongside FP16 compute precision, DiffusionBear v0.5.2 adds three user-facing switches in Parameters → Engine plus two automatic pipeline optimizations. Here are the measured effects and exact limitations on Apple M1 (16 GB):

Control (Parameters → Engine) Default Measured Effect Target & Limitations
Compute PrecisionBF16 / FP16 ⚡ switch + API override BF16 -10% to -67.9% latency on M1; up to -1,669 MB RSS. Best on M1/M2. 13B Krea 2 Turbo shows composition drift in FP16 (SSIM 0.7247); FLUX.2-4B + ref is +12.3% slower.
SSD StreamRAM / SSD ⚡ switch RAM (Off) -64.1% peak footprint on Qwen 2.1 (11,639.8 → 4,181.5 MB), SSIM 1.0000. Recommended for 8 GB Macs. Applies to Qwen-Image 2.1 non-edit txt2img only (disabled on qwen-image-edit).
FLUX.2-9B Light Text EncoderOpt-in 5.1B Q4-G64 (HF) Off (opt-in) 2.57 GiB disk (-73%), -14.4% to -15.4% TE peak MLX RAM. Zero forced downloads. Adds ~3.4–3.8 s on cold prompt-cache misses; minor secondary object shift vs 8B.
Row-Strip VAE DecodeAutomatic (LOW_MEMORY) On -79.0% to -82.3% VAE MLX peak at 1024×1024, SSIM ≥ 0.9978. Active on FLUX.2, FLUX.3, Z-Image, MOSS, FIBO/RMBG & Qwen 2.1. Negligible (~2%) overhead at 512×768.
Qwen StepCache (0.25)Automatic (steps ≥ 16) On (≥16s) -31.6% to -34.4% latency at 25–40 steps, SSIM ≥ 0.981. Disabled below 16 steps (0 steps skipped at 8s) and disabled on Qwen-Edit / ControlNet runs.

Memory Footprint & Apple M1 8 GB / 16 GB Takeaways

Hardware note: Gains above were measured on an Apple M1 (16 GB), which lacks native hardware bfloat16 ALUs. Apple M2 and newer chips already accelerate bfloat16 in hardware, so BF16 vs FP16 deltas on M2/M3/M4 are smaller.