Hugging Face Publishing¶
mlxgen prepare creates a local MLX-Gen model package and writes a README.md model card into it.
The generated card cites the source model, mflux, MLX-Gen, the exact mlx-gen version used to
generate the card, the quantization policy, the source license/access policy when MLX-Gen can infer
it, and the default contributor attribution to @lpalbou.
Generated cards include python -m pip install -U mlx-gen in the usage block so Hugging Face readers can copy and paste a complete baseline command without needing uv. Repository development and release workflows still use uv.
Use mlxgen prepare before upload whenever you want to publish a quantized MLX-Gen package.
mlxgen download only fills the local Hugging Face cache and does not create an uploadable package.
Bonsai Image is an exception: Prism's Bonsai repositories are already packed MLX artifacts, so MLX-Gen supports download/generate rather than preparing or republishing a derivative package.
Prepare A Model Package¶
mlxgen prepare \
--model Qwen/Qwen-Image-Edit-2511 \
--path ./models/qwen-image-edit-2511-4bit \
--quantize 4
The local package contains the MLX-Gen saved-weight layout plus the generated README.md model
card. The card includes a Generated with mlx-gen <version> line so published quantized
checkpoints can be traced back to the package version that created them.
The package can then be uploaded to Hugging Face:
hf upload AbstractFramework/qwen-image-edit-2511-4bit ./models/qwen-image-edit-2511-4bit .
For packages of tens of gigabytes, such as the MiniMax-H3 ones, use the resumable form, which hashes and uploads in parallel and continues after an interruption:
hf upload-large-folder AbstractFramework/minimax-h3-8bit ./models/minimax-h3-8bit
The generated usage block uses the default AbstractFramework/<repo-name> repository id.
SeedVR2 cards use mlxgen upscale because SeedVR2 is an image super-resolution command, not a
mlxgen generate route.
Collections¶
Model-card metadata does not add a model to a Hugging Face collection. Use the Hugging Face UI or huggingface_hub.HfApi.add_collection_item after the model repository exists.
Use the collection slug from the Hugging Face collection URL:
from huggingface_hub import HfApi
HfApi().add_collection_item(
collection_slug="<collection-slug>",
item_id="AbstractFramework/qwen-image-edit-2511-4bit",
item_type="model",
exists_ok=True,
)
Compatibility Wording¶
Generated cards describe model-specific low-bit policies. Qwen and ERNIE q4 checkpoints use mixed
q4/q8 wording to preserve generative quality. Wan q8 checkpoints use mixed q8/BF16 wording because
MLX-Gen keeps Wan conditioning/output projection linears, the VAE, and the UMT5 text encoder at
BF16. SeedVR2 q4/q8 cards describe image super-resolution packages and the mlxgen upscale
command. MiniMax-H3 cards list the width of each component (the 16-bit package, the 8-bit package, or the
mixed-width 4-bit package with its 6-bit transformer), the three packages with their peak memory and
smallest tested Mac in each mode, the --base-model schedule table, and a
video command that writes an MP4 with its soundtrack. Other q8 checkpoints use the standard MLX-Gen/mflux q8 wording. Bonsai pre-packed
repositories are not generated by mlxgen prepare.
See Quantization for the current Qwen, ERNIE, SeedVR2, Wan, MiniMax-H3, and Bonsai low-bit policies.
License And Access Wording¶
Generated cards include license metadata for supported families where the source license is known:
- Qwen, Z-Image, ERNIE Image Turbo, and FLUX.2 Klein 4B derivatives are marked
license: apache-2.0. -
FLUX.2 Klein 9B and FLUX.2 Klein base-9B derivatives are marked
license: otherwithlicense_name: flux-non-commercial-license, source license links, and gated-access prompts. -
MiniMax-H3 derivatives are marked
license: otherwithlicense_name: minimax-h3-community-license-agreementand a link to the sourceLICENSE. The card states the territory the license covers (worldwide except the European Union, the United Kingdom, the Republic of Korea and the United States of America), its use restrictions and commercial terms, and that the weight files were modified. It also carries gated-access prompts for the license and the territory.
When publishing a gated derivative, also configure the Hugging Face repository settings so the repository itself is gated. Model-card metadata alone does not enforce access control.
MiniMax-H3 License Files¶
The MiniMax H3 Community License makes two files part of any distribution, and mlxgen prepare
writes both into the package:
LICENSE: a copy of the agreement, taken from the source snapshot.mlxgen download --model minimax-h3fetches it;preparewarns when the source has none.NOTICE: the notice text the license prescribes, followed by a statement of how the weight files were modified and with which mlx-gen version.
Publishing is a distribution under that license, including its territory terms. Read the agreement, and decide whether and from where you may distribute, before uploading a MiniMax-H3 package.