Instructions to use MedMLX/mlx-generate-ctmr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use MedMLX/mlx-generate-ctmr with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download MedMLX/mlx-generate-ctmr --local-dir mlx-generate-ctmr
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
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.
| 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.5.2.post2"
uv tool install huggingface-hub
hf download MedMLX/mlx-generate-ctmr --revision f9ce3d2b09fd81e24e54e00e1445637805581733 --include 'mr-brain/*' --local-dir models
Replace the example input paths with your own files.
from mlx_generate_ctmr.medmlx import run
result = run(
configuration='mr-brain',
modality='mri_t1',
weights_path='models/mr-brain',
output_dir='outputs',
seed=0,
)
print(result["outputs"])
For CT, download ct/* and mask/* and pass weights_path='models/ct', adding mask_weights_path='models/mask' for paired generation.
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
If you use MedMLX, please cite the MedMLX paper:
@article{sandoval2026medmlx,
title = {MedMLX: On-Device Medical Imaging AI for Apple Silicon},
author = {Sandoval, A. and Sandoval, J. and Saleem, A.},
journal = {medRxiv},
year = {2026},
doi = {10.64898/2026.10.28.26366762}
}
Quantized
Model tree for MedMLX/mlx-generate-ctmr
Base model
nvidia/NV-Generate-CT