This release is a pre-release and may not be stable for production use.
This banner was generated end to end with MiniMax H3 Image using H3 Image MLX.
If you find this repository useful, feel free to 🌟 & fork~
H3 Image MLX
English · 简体中文
Quick start · Image editing · How it works · Benchmarks · Usage · Performance
Generate and edit images on an Apple Silicon Mac with MiniMax H3 Image. Optimized for fast inference, with 4K generation using around 7 GB of peak inference-process memory. Available through a CLI and Python API, ready to use out of the box.
Highlights
- Native Apple Silicon inference. Built on MLX to take advantage of your Mac's compute capabilities, H3 Image runs locally with text-to-image generation and multi-image editing.
- W8A8 quantization and Metal acceleration. Reduce weight memory usage with a portable MLX inference path, plus W8A8 Metal TensorOps acceleration on supported chips. Compatible with M1–M4.
- Staged inference with on-demand block loading. Each stage runs in a separate process to release its memory on completion. Denoiser weights can be read one block at a time, greatly reducing peak memory usage and leaving more room for other apps.
- Overlap weight reads with GPU computation. Prefetch the next block while evaluating the current one, keeping streaming memory low and reducing time spent waiting for weights. Enable prefetch and async
In our 1024×1024 same-machine test, streaming with both switches matched resident-mode speed: 23.61 s vs 23.63 s, with the highest measured process peak falling from 21.18 GB to 3.23 GB — about 85% lower. Outputs matched pixel for pixel. Test conditions and results
Benchmark results
Streaming at resident speed
M5 Pro 48 GB, version 0.1.0a3, 1024×1024, identical weights, prompt and seed, original six-step sampler, no embedding cache.
| Mode | Median generation time | Highest process peak |
|---|---|---|
| Resident | 23.63 s | 21.18 GB |
| Streaming | 32.33 s | 2.53 GB |
| Streaming + prefetch + async | 23.61 s | 3.23 GB |
Resident and prefetch+async: five measured runs each; plain streaming: three. Warmups excluded. Memory is the highest kernel-recorded process physical footprint across measured runs, in decimal GB. Full results and timing ranges · Source JSON
Same-machine controlled comparison
The same M5 Pro MacBook (48 GB), weight files, teapot prompt, initial noise and six-step sigma grid. Each group has one warmup and three measured generations.
| Resolution | MLX DiT mode | ComfyUI time (s) | MLX time (s) | Speed ratio | ComfyUI peak (GB) | MLX peak (GB) |
|---|---|---|---|---|---|---|
| 1024×1024 | resident |
87.15 | 19.90 | 4.38× | 31.29 | 21.16 |
| 1024×1024 | stream |
87.15 | 28.82 | 3.02× | 31.29 | 2.53 |
| 2048×2048 | resident |
134.17 | 57.43 | 2.34× | 38.21 | 22.27 |
| 2048×2048 | stream |
134.17 | 67.06 | 2.00× | 38.21 | 3.48 |
| 4096×4096 | stream |
570.59 | 317.29 | 1.80× | 42.31 | 7.18 |
Time is the median complete generation request. Memory is the kernel-recorded single-process physical-footprint peak, including warmup, in decimal GB. Speed ratio = local ComfyUI time ÷ MLX time.
This compares complete pipelines: ComfyUI's default text encoder runs on CPU; MLX uses GPU. The main table reproduces the community configuration. The additional native INT8 DiT path, pinned versions and measurement method are in the full benchmark records, with source JSON in this repository.
Supplementary community measurements
| Device / memory | Pipeline | DiT mode | Resolution | Time (s) | Process peak (GB) | Source |
|---|---|---|---|---|---|---|
| M5 MacBook Air / 16 GB | H3 Image MLX | stream |
1024×1024 | 70.51 | 2.48 | arielfikru |
| M5 MacBook Air / 16 GB | H3 Image MLX | stream |
2048×2048 | 240.78 | 2.78 | arielfikru |
| M5 Pro Mac mini / 64 GB | ComfyUI + MPS INT8 | — | 1024×1024 | 89.55 | 31.42 | pratikgx |
| M5 Pro Mac mini / 64 GB | ComfyUI + MPS INT8 | — | 2048×2048 | 164.90 | 36.21 | pratikgx |
| M5 Pro Mac mini / 64 GB | ComfyUI + MPS INT8 | — | 4096×4096 | 547.31 | 48.78 | pratikgx |
Independent measurements on different machines, retaining contributors' original results. Run counts and measurement methods are in the full records, alongside the earlier M5 Pro runs.
Generation gallery
Generated locally with H3 Image MLX: food, wildlife, product photography, architecture, illustration and a 4K watchmaker portrait. Click the collage to view it at full size.
Generate your first image
Version 0.1.0a4 also supports unquantized BF16 DiT and text-encoder weights, retaining AdaLN pruning and staged streaming. Select --precision bf16; INT8 remains the default. BF16 download and usage
Use Python 3.11 or later on a Mac with Metal. Allow 49.30 GB of disk space for a fresh model download. Check the MiniMax model license for regional and usage restrictions.
python3 -m venv .venv
source .venv/bin/activate
python -m pip install 'h3-image-mlx==0.1.0a4'
h3-image-mlx fetch --models ./models
h3-image-mlx generate --models ./models --output teapot.png \
--prompt 'A yellow enamel teapot and a white cup on a blue wooden table.'
This writes a 1024×1024 RGB PNG. Set --width and --height to change the size. Each dimension accepts multiples of 32 from 256 through 4096.
Recommended streaming acceleration
Use weight prefetch and asynchronous evaluation together with --dit-mode stream to reduce weight-loading waits. Both switches are off by default. The six-step sampler stays unchanged. Our 1024×1024 test matched resident-mode speed with about 85% less peak process memory. Same-machine results · Contributor measurements
Available from 0.1.0a2; upgrade and enable both switches for this command:
python -m pip install --upgrade 'h3-image-mlx==0.1.0a4'
H3_ASYNC=1 H3_PREFETCH=1 h3-image-mlx generate \
--models ./models --dit-mode stream --output teapot.png \
--prompt 'A yellow enamel teapot and a white cup on a blue wooden table.'
Usage guide: CLI, Python and existing weights · Performance guide: switches, caching and profiling
Experimental: optional two-/three-step LoRA inference and LoRA-merged INT8 checkpoints are available on GitHub main, off by default. Usage and quality trade-offs
Edit with reference images
To replace the cup in teapot.png with a bird from your own photo, save the photo as bird.png. Number the pictures in your prompt in the order you pass them on the command line.
h3-image-mlx generate --models ./models --output edit.png \
--reference teapot.png --reference bird.png \
--prompt 'Edit <Picture 1>. Replace the white cup with the bird from <Picture 2>. Keep the teapot and table.'
You can pass up to 16 references. On an M5 Pro, we completed one- and two-reference edits. The 16-reference test reached the third of six denoising steps before cancellation. Validation notes
How it works
The pipeline reduces memory use at three levels: between model stages, within the denoiser, and during image decoding.
- Run one stage at a time. Text encoding, denoising and VAE decoding run in separate processes. Each saves its intermediate output and exits before the next loads its weights, so the three models do not need to stay in memory together. Editing adds a reference-image VAE encoding stage before denoising.
- Keep quantized projections compact. The runtime reads Comfy-Org's INT8 ConvRot weights directly. Activations are rotated and dynamically quantized to INT8 before quantized linear projections. Supported chips use W8A8 Metal TensorOps; the portable backend evaluates the same quantized projections with tiled standard MLX operations. Other operations retain their appropriate floating-point precision.
- Load denoiser weights as needed. In
streammode, tensors are read from safetensors as each transformer block runs, rather than cached for all six steps. Denoising still operates on the full image's latent sequence.residentmode caches weights to reduce repeated reads. The runtime also precomputes the steps' AdaLN modulation values from the compressed curves in Comfy-Org's pruned checkpoint, then releases the setup weights. - Decode in overlapping tiles. The VAE decodes small groups of latent tiles and blends their overlapping edges into the output image, limiting decoder working memory at high resolutions.
Streaming keeps memory low by reading weights on demand. Prefetch and asynchronous evaluation overlap these reads with GPU work to reduce the time cost. Peak usage still includes activations, attention buffers and image buffers, so resolution and reference-image count matter. See the benchmark results for the measured trade-off.
Hardware and memory
M5/M6 select W8A8 Metal TensorOps by default; M1–M4 use the portable MLX backend. Use --dit-mode stream for lower memory usage or --dit-mode resident to retain denoiser weights between steps. Hardware validation and automatic mode selection
Documentation
| Document | Contents |
|---|---|
| Usage guide | CLI parameters, reference editing, Python API and existing weights |
| Performance guide | Recommended streaming switches, hardware modes, embedding cache and profiling |
| Benchmarks | Measurements, environments and source JSON |
| Validation notes | Completed checks and remaining hardware coverage |
Credits and licenses
MiniMax developed H3 Image and supplies the VAE configuration. Comfy-Org provides the quantized weights. The three W8A8 Metal kernel files come from mlx-serve and retain their MIT license. This project’s runtime code uses Apache-2.0.
About
I'm anionex, an AI-native developer who once ranked No. 3 on GitHub's global developer trending list, with more than 18.7k stars across my projects. If you would like to follow my future work, follow me on X or GitHub.
Metadata
Release files for h3-image-mlx 0.1.0a4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| h3_image_mlx-0.1.0a4.tar.gz | 53.4 kB | With provenance | Details for h3_image_mlx-0.1.0a4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| h3_image_mlx-0.1.0a4-py3-none-any.whl | Python 3 | none | any | Details for h3_image_mlx-0.1.0a4-py3-none-any.whl |
Total release size: 100.7 kB
Release files / h3_image_mlx-0.1.0a4.tar.gz
| Download URL | h3_image_mlx-0.1.0a4.tar.gz |
|---|---|
| Size | 53.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a90442ef64adcb621106f6dc09d8174ed6218d29a5bc80948fda5318ca1b9a1
|
|
BLAKE2b-256 checksum How to use checksums |
5ed585d309941a703d53cb1ac84802e334881aac6eec665933151b6268e0d459
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / h3_image_mlx-0.1.0a4-py3-none-any.whl
| Download URL | h3_image_mlx-0.1.0a4-py3-none-any.whl |
|---|---|
| Size | 47.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bbc45858f5927c4190794e8155e8a5cadab3dc8b37d4b68abb5fb2874103ee51
|
|
BLAKE2b-256 checksum How to use checksums |
c4c2766b7273ca0fefd1b48edc512f00c6372282c3a9ce874470016d3fe0e9ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logSecurity for h3-image-mlx 0.1.0a4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for h3_image_mlx-0.1.0a4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.