I can’t operate total segmentator with the task oculomotor muscles, I got an error message when making any attempt.
I am running Slicer 5,9,0 25-08-14 on a Mac Apple chip M2 Sequoia 15.6. What is wrong?
Here after the error log: Processing started
Writing input file to /private/var/folders/xw/49j5chs13nl_nzll7509jd5h0000gn/T/Slicer-philippe/__SlicerTemp__2025-08-16_16+49+21.069/total-segmentator-input.nii
Creating segmentations with TotalSegmentator AI…
Total Segmentator arguments: [‘-i’, ‘/private/var/folders/xw/49j5chs13nl_nzll7509jd5h0000gn/T/Slicer-philippe/__SlicerTemp__2025-08-16_16+49+21.069/total-segmentator-input.nii’, ‘-o’, ‘/private/var/folders/xw/49j5chs13nl_nzll7509jd5h0000gn/T/Slicer-philippe/__SlicerTemp__2025-08-16_16+49+21.069/segmentation’, ‘–ml’, ‘–task’, ‘oculomotor_muscles’]
No GPU detected. Running on CPU. This can be very slow. The ‘–fast’ or the --roi_subset
option can help to reduce runtime.
If you use this tool please cite: https://pubs.rsna.org/doi/10.1148/ryai.230024
Traceback (most recent call last):
File “/Applications/Slicer.app/Contents/lib/Python/bin/TotalSegmentator”, line 8, in
sys.exit(main())
^^^^^^
File “/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/totalsegmentator/bin/TotalSegmentator.py”, line 155, in main
totalsegmentator(args.input, args.output, args.ml, args.nr_thr_resamp, args.nr_thr_saving,
File “/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/totalsegmentator/python_api.py”, line 142, in totalsegmentator
from totalsegmentator.nnunet import nnUNet_predict_image # this has to be after setting new env vars
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/totalsegmentator/nnunet.py”, line 29, in
from totalsegmentator.custom_trainers import nnUNetTrainer_MOSAIC_1k_QuarterLR_NoMirroring
File “/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/totalsegmentator/custom_trainers.py”, line 2, in
from nnunetv2.training.nnUNetTrainer.variants.data_augmentation.nnUNetTrainerNoMirroring import nnUNetTrainerNoMirroring
File “/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/nnunetv2/training/nnUNetTrainer/variants/data_augmentation/nnUNetTrainerNoMirroring.py”, line 26, in
from nnunetv2.training.nnUNetTrainer.nnUNetTrainer import nnUNetTrainer
File “/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py”, line 43, in
from torch import GradScaler
ImportError: cannot import name ‘GradScaler’ from ‘torch’ (/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/torch/init.py)