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 tools/plot_benchmarks.py from devin-lai/MiniMax-H3-Image-mlx: direct link, hf CLI and curl.
- Browser
- Download file 3.84 kB
-
https://huggingface.co/devin-lai/MiniMax-H3-Image-mlx/resolve/refs%2Fpr%2F1/tools/plot_benchmarks.py
- Command line
-
hf download hf://devin-lai/MiniMax-H3-Image-mlx@refs/pr/1/tools/plot_benchmarks.py
-
curl -L -o plot_benchmarks.py https://huggingface.co/devin-lai/MiniMax-H3-Image-mlx/resolve/refs%2Fpr%2F1/tools/plot_benchmarks.py
3.84 kB
| """Render recorded sample timings; requires matplotlib (no model weights).""" | |
| import json | |
| from pathlib import Path | |
| import matplotlib | |
| matplotlib.use("Agg") | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| def main(): | |
| root = Path(__file__).resolve().parents[1] | |
| plt.rcParams.update( | |
| { | |
| "font.family": "DejaVu Sans", | |
| "font.size": 11, | |
| "svg.fonttype": "none", | |
| "axes.spines.top": False, | |
| "axes.spines.right": False, | |
| } | |
| ) | |
| fig, axes = plt.subplots(1, 2, figsize=(11.6, 4.5), sharey=True) | |
| fig.patch.set_facecolor("#f7fafc") | |
| colors = ["#8296ac", "#137f82"] | |
| for ax, storage, title in zip( | |
| axes, ["bf16", "packed12"], ["BF16", "Lossless packed BF16"], strict=True | |
| ): | |
| ax.set_facecolor("#f7fafc") | |
| summary = json.loads( | |
| (root / f"benchmarks/data/{storage}/summary.json").read_text() | |
| ) | |
| comparison = json.loads( | |
| (root / f"benchmarks/data/{storage}/comparison.json").read_text() | |
| ) | |
| for case_index, case in enumerate(["product", "portrait"]): | |
| for index, (variant, label) in enumerate( | |
| [("control", "Control"), ("qk-fc2-native-norm", "Tuned")] | |
| ): | |
| values = summary["cases"][case][variant]["samples_s"] | |
| x = case_index + (-0.16 if index == 0 else 0.16) | |
| ax.scatter( | |
| x + np.array([-0.045, 0, 0.045]), | |
| values, | |
| color=colors[index], | |
| s=35, | |
| zorder=3, | |
| label=label if case_index == 0 else None, | |
| ) | |
| median = float(np.median(values)) | |
| ax.plot( | |
| [x - 0.11, x + 0.11], [median, median], color=colors[index], lw=2.3 | |
| ) | |
| ax.annotate( | |
| f"{median:.2f}", | |
| (x, median), | |
| xytext=(0, -17 if index else 12), | |
| textcoords="offset points", | |
| ha="center", | |
| color=colors[index], | |
| fontsize=10, | |
| fontweight="bold", | |
| ) | |
| before = comparison["baseline_summary"]["geomean_seconds"] | |
| after = comparison["candidate_summary"]["geomean_seconds"] | |
| ax.set_title( | |
| f"{title}\n{before:.2f} s → {after:.2f} s (−{comparison['latency_reduction_pct']:.2f}%)", | |
| loc="left", | |
| fontsize=13, | |
| fontweight="bold", | |
| pad=18, | |
| ) | |
| ax.set_xticks([0, 1], ["Product · seed 731", "Portrait · seed 1234"]) | |
| ax.set_xlim(-0.48, 1.48) | |
| ax.set_ylim(58.5, 69) | |
| ax.grid(axis="y", color="#dce5ed", lw=0.8, zorder=0) | |
| ax.legend(frameon=False, loc="lower left", ncols=2) | |
| ax.spines["left"].set_color("#b7c8d6") | |
| ax.spines["bottom"].set_color("#b7c8d6") | |
| axes[0].set_ylabel("Warm complete generation · seconds") | |
| fig.suptitle( | |
| "2048 × 2048 · six steps · M5 Pro / 64 GiB · MLX 0.32.4", | |
| fontsize=14, | |
| fontweight="bold", | |
| y=0.98, | |
| ) | |
| fig.text( | |
| 0.5, | |
| 0.025, | |
| "Dots: all three repeats. Lines: medians. Cached conditioning and resident weights; separate paired campaigns.\nHeadline values: geometric mean of case medians. Startup/downloads excluded; trace and PNG save included.", | |
| ha="center", | |
| fontsize=9, | |
| color="#465d70", | |
| ) | |
| fig.tight_layout(rect=(0, 0.12, 1, 0.9), w_pad=3) | |
| target = root / "assets/benchmarks.svg" | |
| fig.savefig(target, facecolor=fig.get_facecolor()) | |
| fig.savefig( | |
| "/tmp/minimax-benchmarks-preview.png", dpi=140, facecolor=fig.get_facecolor() | |
| ) | |
| print(target) | |
| if __name__ == "__main__": | |
| main() | |