Text-to-Image
MLX
MiniMax H3
Safetensors
English
apple-silicon
macos
image-to-image
image-editing
image-generation
Instructions to use devin-lai/MiniMax-H3-Image-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use devin-lai/MiniMax-H3-Image-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download devin-lai/MiniMax-H3-Image-mlx --local-dir MiniMax-H3-Image-mlx
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Download experiments/r3/common.py from devin-lai/MiniMax-H3-Image-mlx: direct link, hf CLI and curl.
- Browser
- Download file 1.26 kB
-
https://huggingface.co/devin-lai/MiniMax-H3-Image-mlx/resolve/main/experiments/r3/common.py
- Command line
-
hf download hf://devin-lai/MiniMax-H3-Image-mlx/experiments/r3/common.py
-
curl -L -o common.py https://huggingface.co/devin-lai/MiniMax-H3-Image-mlx/resolve/main/experiments/r3/common.py
1.26 kB
| """Counterbalanced timings and macOS physical footprint, without another GPU runtime.""" | |
| from __future__ import annotations | |
| import statistics | |
| import time | |
| import mlx.core as mx | |
| def paired(control, candidate, repeats=6, warmup=2): | |
| for _ in range(warmup): | |
| mx.eval(control()) | |
| mx.eval(candidate()) | |
| samples = {"control": [], "candidate": []} | |
| order = [] | |
| for i in range(repeats): | |
| names = ("control", "candidate") if i % 2 == 0 else ("candidate", "control") | |
| for name in names: | |
| fn = control if name == "control" else candidate | |
| mx.synchronize() | |
| start = time.perf_counter() | |
| value = fn() | |
| mx.eval(value) | |
| mx.synchronize() | |
| samples[name].append((time.perf_counter() - start) * 1000) | |
| order.append(name) | |
| del value | |
| result = {"order": order} | |
| for name, values in samples.items(): | |
| result[name] = { | |
| "median_ms": statistics.median(values), | |
| "min_ms": min(values), | |
| "max_ms": max(values), | |
| "samples_ms": values, | |
| } | |
| result["reduction_pct"] = 100 * ( | |
| 1 - result["candidate"]["median_ms"] / result["control"]["median_ms"] | |
| ) | |
| return result | |