TotalSegmentator v2 CT for MLX
Native MLX safetensors for TotalSegmentator v2 CT inference on Apple Silicon. The five 1.5 mm standard models are in 291–295, the 3 mm fast model in 297, the 6 mm coarse model in 298, and the body crop model in 300. Each folder includes nnU-Net plans and model metadata.
TotalSegmentator is the work of Jakob Wasserthal and co-authors. The model, its training method and the weights are theirs: see the original repository, wasserth/TotalSegmentator, and the paper, Radiology: Artificial Intelligence, 2023. This repository only repackages their released weights (v2.0.0 weight archives) for MLX on Apple Silicon. Please cite their paper and star their repository if TotalSegmentator is useful to you.
The weights were converted from the official TotalSegmentator v2.0.0 weight archives for use with totalsegmentator-mlx. Conversion changes tensor names and layouts for MLX; the models were not retrained.
Quick start
uv venv --python 3.13
source .venv/bin/activate
uv pip install "totalsegmentator-mlx>=0.3.0" huggingface-hub
hf download MedMLX/totalsegmentator-mlx --revision 6c03d6f90ccf53f224c3985cbdecf1eaa96555af --local-dir models
from totalsegmentator_mlx import run
result = run(image_path="ct.nii.gz", output_dir="out", weights_path="models")
print(result["outputs"]["mask"])
Without weights_path, the weights download from this repository on first use.
The total and body tasks are distributed by the authors under Apache-2.0. See the upstream repository and the included license for terms and attribution. Please cite TotalSegmentator and nnU-Net as described by the upstream authors. For research and education; outputs require human review.
Citation
Please cite the original paper:
Wasserthal, J. et al. (2023). TotalSegmentator: robust segmentation of 104 anatomic structures in CT images. Radiology: Artificial Intelligence, 5(5), e230024. https://doi.org/10.1148/ryai.230024
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}
}