--- library_name: mlx pipeline_tag: text-to-image license: other license_name: minimax-h3-image-community-license-agreement license_link: https://huggingface.co/devin-lai/MiniMax-H3-Image-mlx/blob/v0.4.1/LICENSE-model base_model: MiniMaxAI/MiniMax-H3-Image language: - en tags: - mlx - apple-silicon - macos - minimax-h3 - text-to-image - image-to-image - image-editing - image-generation - safetensors inference: false ---

MiniMax H3 Image — local image generation and editing on Apple silicon

Code: Apache 2.0 Portable checks Apple silicon, MLX 0.32.4 Hugging Face model collection

# MiniMax H3 Image · MLX **Generate and edit images locally on your Mac. Six distilled steps. Four weight choices. Native MLX and Metal.** A community inference port of [MiniMax-H3-Image](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image) by [Devin Lai](https://github.com/devin-lai). Use the preconverted models in the [Apple silicon collection](https://huggingface.co/collections/devin-lai/minimax-h3-image-apple-silicon-mlx) for text-to-image generation and reference-image editing. [Quick start](#quick-start) · [Sample gallery](examples/README.md) · [Benchmarks](BENCHMARKS.md) · [Usage & Python API](USAGE.md) · [简体中文](README.zh-CN.md) - **Local inference:** text encoder, diffusion transformer, reference encoder and VAE run with MLX on Metal. - **Lossless packed BF16:** 27.23 GiB variant payload, reconstructing the original BF16 bits before matrix multiplication. - **Reproducible outputs:** every image gets a JSON record with prompt, seed, schedule, precision, hardware and timings. - **Measured tuning:** optional compiled blocks and exact M5 kernels; native fallback on unsupported shapes and devices. **Inference code is Apache-2.0. Model conversion, packing encoders and weight export tools are closed and are not included.** This runtime loads the collection's existing BF16, packed12, Q8 and Q4 files. Weights and generated outputs retain the upstream model terms; see [licenses and access](#licenses-and-access). ## Quick start Use an **Apple silicon Mac** and native arm64 Python 3.12. The tested machine is an **M5 Pro with 64 GiB unified memory**; smaller-memory Macs have not been qualified. Install [uv](https://docs.astral.sh/uv/getting-started/installation/), then: ```bash git clone https://github.com/devin-lai/MiniMax-H3-Image-MLX.git cd MiniMax-H3-Image-MLX uv venv --python 3.12 source .venv/bin/activate uv pip install '.[native]' h3-mlx doctor ``` Request access to your chosen variant and the [shared components](https://huggingface.co/devin-lai/MiniMax-H3-Image-mlx-shared) on Hugging Face, read their terms, and sign in: ```bash hf auth login h3-mlx download --variant packed12 --model-dir models/packed12 h3-mlx generate --model models/packed12 \ --text-encoder models/packed12/text_encoder \ 'An editorial photograph of a cobalt perfume bottle on pale stone' \ --width 2048 --height 2048 --seed 731 --output outputs/bottle.png ``` The first download includes a **separate roughly 62 GiB text encoder**, shared components and your selected weights. Download size is not a RAM requirement. Reuse an encoder with `--text-encoder-path /path/to/text_encoder`. The `native` extra supplies PyTorch for the original CPU random-noise stream; model computation runs in MLX. For editing, add `--image outputs/bottle.png` and use a prompt such as `'Change the bottle in to emerald green glass, preserving the label'`. [More commands, offline use and resident pipelines →](USAGE.md) ## Choose your weights | Variant | Variant payload¹ | Intended use | |---|---:|---| | **[packed12](https://huggingface.co/devin-lai/MiniMax-H3-Image-mlx-packed12)** | **27.23 GiB** | Recommended exact storage choice; lossless BF16 | | [BF16](https://huggingface.co/devin-lai/MiniMax-H3-Image-mlx-bf16) | 61.73 GiB | Original complete transformer storage | | [Q8](https://huggingface.co/devin-lai/MiniMax-H3-Image-mlx-q8) | 19.83 GiB | Smaller core, with image/detail changes | | [Q4](https://huggingface.co/devin-lai/MiniMax-H3-Image-mlx-q4) | 10.50 GiB | Smallest core, with stronger fidelity tradeoffs | ¹ Excludes shared VAE/support/heads/tables (up to 3.86 GiB), the text encoder, dependencies and runtime memory. BF16 includes native support, so the downloader omits the redundant shared copy. One variant is downloaded at a time; shared files and the encoder are reused. [Pinned model catalog](h3_mlx/model_index.json). Q8/Q4 use affine groups of 64 for attention/MLP weights and preserve FP32 precision islands. They reduce storage; an inference-speed advantage has not been established. **packed12 is storage compression, not quantization.** ## Performance you can inspect **2048 × 2048 · all six steps · M5 Pro / 16 GPU cores / 64 GiB · MLX 0.32.4** | Weight storage | Warm control | Warm tuned | Latency reduction | Max sampled parent footprint² | |---|---:|---:|---:|---:| | BF16 | 65.83 s | **62.49 s** | **5.07%** | 40.50 GiB | | Lossless packed BF16 | 66.42 s | **64.05 s** | **3.57%** | **32.56 GiB** | ![Paired warm generation measurements: individual samples and medians](assets/benchmarks.svg) These are historical warm measurements with cached conditioning and resident weights. Each headline latency is the geometric mean of product and portrait medians, three alternating repeats per case. Timings include trace/PNG save; downloads and interpreter startup are excluded. A fresh CLI process includes loading and should not be expected to match them. ² Maximum sampled parent-process physical footprint across four candidate cases, including an edit; **not minimum required RAM**. BF16 and packed12 are separate campaigns. Each tuned configuration matched every output pixel and saved trajectory tensor of its own MLX control across those four cases. CUDA pixel identity and broad image-quality superiority are not claimed. [Method, raw samples, Q8/Q4 tradeoffs and CUDA comparison scope →](BENCHMARKS.md) To enable the measured tuning, add: ```bash --compile-blocks --eval-every 0 --prefetch-blocks 4 \ --compile-vae --vae-batch 4 --kernel metal-qk-exact --tune-matmul ``` ## Real samples and comparisons The [recorded sample gallery](https://huggingface.co/devin-lai/MiniMax-H3-Image-mlx-examples) contains **AI-generated** product, portrait, fine-detail and editing images, along with full-resolution crops and native/Q8/Q4 comparisons. It retains its existing access review under the model terms. | Sample | Inspect the recorded image | Reproduction details | |---|---|---| | Product lettering & glass | [NIGHT TIDE perfume bottle](https://huggingface.co/devin-lai/MiniMax-H3-Image-mlx-examples/blob/v0.4.0/examples/product.png) | packed12 · seed 731 · 2048² | | Portrait & skin detail | [Conservatory portrait](https://huggingface.co/devin-lai/MiniMax-H3-Image-mlx-examples/blob/v0.4.0/examples/portrait.png) | packed12 · seed 1234 · 2048² | | Fine mechanical detail | [Watchmaker's bench](https://huggingface.co/devin-lai/MiniMax-H3-Image-mlx-examples/blob/v0.4.0/examples/holdout-detail.png) | packed12 · seed 928417 · 2048² | | Reference-image editing | [Cobalt → emerald glass](https://huggingface.co/devin-lai/MiniMax-H3-Image-mlx-examples/blob/v0.4.0/comparisons/edit-example/before-after.png) | one reference · seed 42 · 1024² output | [Full prompts, input identities, hashes and sample runner →](examples/README.md) ## Development and contributions ```bash uv pip install -e '.[dev]' python -m pytest -q ruff check . python -m build python tools/check_release.py dist/*.whl dist/*.tar.gz ``` Hardware tests require a local Apple GPU. GitHub Actions checks portable Hub logic, CLI boundaries, lint, packaging and the inference-only artifact audit. [Validation evidence](docs/VALIDATION.md) · [Contributing](CONTRIBUTING.md) · [Technical notes](docs/TECHNICAL.md) · [Release notes](CHANGELOG.md). Results from more Apple silicon chips are welcome. Include the inference JSON, chip, memory, macOS version, command and variant when [reporting an issue](https://github.com/devin-lai/MiniMax-H3-Image-MLX/issues). If this is useful, star the project and share a reproducible result. ## Licenses and access **Runtime code:** [Apache-2.0](LICENSE). **Image model:** [MiniMax-H3-Image Community License Agreement](LICENSE-model). **Separate text encoder:** [MiniMax H3 Community License Agreement](LICENSE-text-encoder). The model agreements include territorial, commercial, redistribution and acceptable-use conditions. Their standard grants exclude the EU, UK, Republic of Korea and US absent separate permission. Hub access does not grant additional rights. Model weights and original sample images are hosted on Hugging Face. Independent community adaptation by Devin Lai; this is not an official MiniMax release or endorsement. **Powered by MiniMax-H3-Image.** [NOTICE](NOTICE) · [Modifications](docs/MODIFICATIONS.md) · [Upstream source provenance](provenance/sources.json).