HiDream-O1-Image-Dev โ€” MLX Q8 (Apple Silicon)

Ported by Mrbizarro ยท MIT licensed ยท published to mlx-community

๐ŸŽ›๏ธ Run it one-click in Phosphene

Phosphene is a free local generative-video panel for Apple Silicon. HiDream is wired into its Image Studio. Install Pinokio, then in Pinokio install Phosphene. Note: Phosphene's HiDream integration uses BF16 by default since edit requires BF16 โ€” this Q8 repo is for text-to-image-only workflows that want a deterministic memory upper bound.


An 8-bit quantized MLX port of HiDream-ai/HiDream-O1-Image-Dev.

โš  Q8 does NOT support edit / multi-ref. Per-group dequantization noise compounds against reference-image features in attention and produces degenerate output. For edit / multi-reference workflows use the BF16 sibling repo instead.

Sibling repos

  • ๐ŸŸข BF16 (full precision) โ€” 17.5 GB, ~16 GB RAM, clean across all dimensions. Use this when in doubt.
  • ๐ŸŸก Q6 โ€” 8 GB, ~8.5 GB RAM, fastest. Same artifact behaviour as Q8.
  • ๐ŸŸก Q8 (this repo) โ€” 10 GB, ~11.5 GB RAM, balanced. Best at square 2048ร—2048 or 1024ร—1024. Visible 32-pixel patch grid in flat regions at non-square dims.

When to use Q8

  • โœ… Square 1024ร—1024 or 2048ร—2048 โ€” clean output, less RAM than BF16
  • โœ… When you want a deterministic memory upper bound (Q8 doesn't depend on activation distribution)
  • โŒ Non-square dims (1440ร—2560, 3104ร—1312, etc) โ€” visible 32-pixel patch grid in skies, walls, water โ†’ use BF16
  • โš  Q8 is not faster than Q6 here โ€” both are bandwidth-bound on this hardware. Pick Q8 only if you need its slightly tighter quality margin at square dims.

What's in this repo

  • model.safetensors โ€” Q8 quantized backbone (10 GB)
  • extras/custom_heads.safetensors โ€” diffusion-side heads (75 MB, BF16)
  • config.json (with quantization: {bits: 8, group_size: 64} so mlx-vlm wraps Linear โ†’ QuantizedLinear correctly)
  • Tokenizer + processor configs

Code

Inference scripts are in the BF16 sibling repo under scripts/hidream_o1/. Clone that for code, this for weights only.

Quick start

# Get the code from the BF16 sibling
hf download mlx-community/HiDream-O1-Image-Dev-mlx-bf16 --local-dir hidream-o1-mlx \
  --include "scripts/*" --include "*.md" --include "*.txt" --include "*.gitattributes"
cd hidream-o1-mlx
uv venv --python 3.11 && uv pip install -r requirements.txt

# Get the Q8 weights
hf download mlx-community/HiDream-O1-Image-Dev-mlx-q8 --local-dir mlx_models/hidream-o1-dev-q8

# Run (square dims only for clean output)
.venv/bin/python scripts/hidream_o1/generate_hidream_o1_mlx.py \
  --model-path mlx_models/hidream-o1-dev-q8 \
  --prompt "your prompt here" \
  --width 2048 --height 2048 \
  --output out.png

Performance

Resolution Per step Total (28 steps) Peak RAM Quality
1024ร—1024 2.36 s 67 s 11.5 GB โœ… clean
2048ร—2048 6.68 s 187 s 11.5 GB โœ… clean
1440ร—2560 (non-square) ~4.5 s ~127 s ~10 GB โš  patch grid visible

License

MIT โ€” see the BF16 repo for the full LICENSE file and acknowledgements.

Downloads last month
56
Safetensors
Model size
9B params
Tensor type
U32
ยท
BF16
ยท
MLX
Hardware compatibility
Log In to add your hardware

Quantized

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

Model tree for mlx-community/HiDream-O1-Image-Dev-mlx-q8

Finetuned
(5)
this model