mlx-generate-ctmr
Native MLX weights for NVIDIA NV-Generate CT, paired CT mask generation, general MR and MR-Brain. These weights were converted to safetensors without retraining.
NV-Generate (MAISI) is the work of Can Zhao, Pengfei Guo and co-authors at NVIDIA. The models, their training method and the weights are theirs: see the original repository, NVIDIA-Medtech/NV-Generate-CTMR, and the papers, MAISI-v2 and MAISI. This repository only repackages their released weights (NV-Generate-CT and NV-Generate-MR-Brain) for MLX on Apple Silicon. Please cite their papers and star their repository if NV-Generate is useful to you.
| Directory | Configuration | Contents |
|---|---|---|
ct/ | CT | Image VAE, UNet and ControlNet, plus the paired-CT label mapping and anatomy-size database |
mask/ | Learned paired CT masks | Mask VAE and UNet |
mr/ | General MR | Image VAE and UNet |
mr-brain/ | MR-Brain | Image VAE and UNet |
Use the mlx-generate-ctmr package and pass the appropriate directory to its runner. Learned paired CT uses ct/configs/label_dict_124_to_132.json from NV-Generate-CTMR (Apache-2.0) and ct/datasets/all_anatomy_size_conditions.json from NV-Generate-CT, both unmodified. MR configurations require the conversion.json beside model.safetensors.
Quick start
uv venv --python 3.13
source .venv/bin/activate
uv pip install "mlx-generate-ctmr>=0.7.0"
from mlx_generate_ctmr import run
result = run(
model="mlx-generate-ctmr-mr-brain",
modality="mri_t1",
output_dir="outputs",
seed=0,
)
print(result["outputs"])
Weights download from this repository on first use, at a pinned revision. To fetch them yourself, download that revision and pass the folder as weights_path="models/mr-brain":
uv tool install huggingface-hub
hf download MedMLX/mlx-generate-ctmr --revision 080ba618be71f268927962bd911384942072fcb0 --include 'mr-brain/*' --local-dir models
For CT, use model="mlx-generate-ctmr-ct"; download ct/* and mask/*, pass weights_path="models/ct" and add mask_weights_path="models/mask" for paired generation. General MR is model="mlx-generate-ctmr-mr".
Use & license
For research and education. Not validated for clinical use. Synthetic output is not ground truth.
General MR is for noncommercial research only under the NVIDIA OneWay Non-Commercial License. The MR-Brain UNet comes from NV-Generate-MR-Brain, and the CT and paired-mask weights come from NV-Generate-CT. MR-Brain also uses the CT VAE.
NVIDIA's CT model card metadata identifies the Open Model License, while its terms-of-use link points to the Community Model License. Until NVIDIA clarifies the CT terms, comply with both the Open Model License and the Community Model License for CT, paired-mask and MR-Brain bundles. The Community agreement restricts some uses of outputs to develop other AI models and conditions production use; consult the agreements. See the root NOTICE, upstream notices, and the ct/NOTICE and mask/NOTICE for source revisions and attribution.
References
Citation
Please cite the original papers:
Zhao, C. et al. (2025). MAISI-v2: Accelerated 3D High-Resolution Medical Image Synthesis with Rectified Flow and Region-specific Contrastive Loss. arXiv:2508.05772.
Guo, P. et al. (2024). MAISI: Medical AI for Synthetic Imaging. arXiv:2409.11169.
If you use MedMLX, please cite the MedMLX paper:
@article{sandoval2026medmlx,
title = {MedMLX: On-Device Medical Imaging AI for Apple Silicon},
author = {Sandoval, J. and Sandoval, A. and Saleem, A.},
journal = {medRxiv},
year = {2026},
doi = {10.64898/2026.10.28.26366762}
}