# TotalSegmentator problem - Macbook M1 Max

**URL:** <https://discourse.slicer.org/t/totalsegmentator-problem-macbook-m1-max/26802>\
**Category:** Support\
**Tags:** extensions-manager\
**Created:** [December 18, 2022, 1:11pm UTC](https://discourse.slicer.org/t/totalsegmentator-problem-macbook-m1-max/26802 "2022-12-18T13:11:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![miklontzas](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@miklontzas](https://discourse.slicer.org/u/miklontzas)\
**Post date:** [December 18, 2022, 1:11pm UTC](https://discourse.slicer.org/t/totalsegmentator-problem-macbook-m1-max/26802/1 "2022-12-18T13:11:21Z")

</div>

Hi there,

I have been trying to use the Totalsegmentator extension in a MacBook M1 Max. The extension gets installed properly but when trying to run a segmentation for the first time, it starts installing some python packages. During the installation it gives the following error and stops “Failed to compute results. “git” is required to install TotalSegmentator”.

Any idea how to solve this problem?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 18, 2022, 1:29pm UTC](https://discourse.slicer.org/t/totalsegmentator-problem-macbook-m1-max/26802/2 "2022-12-18T13:29:38Z")

</div>

The message is correct, if you don’t have git on your computer already then you need to install it.

You can either install [Github desktop](https://desktop.github.com/) or follow [these instructions](https://git-scm.com/downloads).

---

<div class="post-metadata">

**Author:** ![miklontzas](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@miklontzas](https://discourse.slicer.org/u/miklontzas)\
**Post date:** [December 18, 2022, 6:36pm UTC](https://discourse.slicer.org/t/totalsegmentator-problem-macbook-m1-max/26802/3 "2022-12-18T18:36:01Z")

</div>

Thank you. Problem solved. Any idea if it is using the M1 Max gpu or cpu?

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [December 19, 2022, 9:27am UTC](https://discourse.slicer.org/t/totalsegmentator-problem-macbook-m1-max/26802/4 "2022-12-19T09:27:05Z")

</div>

TotalSegmentator will [automatically use a CUDA-compatible GPU](https://github.com/wasserth/TotalSegmentator/blob/9358889410a3687f3a49953f7184f8c9cd021374/README.md#usage) if available, otherwise CPU.

As far as I see, the ARM-based M1 Max can not enable CUDA.

For orientation: The “total” process (–fast option) takes 47.43 seconds on an RTX 1060 Windows laptop with CUDA enabled and in GPU mode (CTChest demo dataset).

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 19, 2022, 4:08pm UTC](https://discourse.slicer.org/t/totalsegmentator-problem-macbook-m1-max/26802/5 "2022-12-19T16:08:59Z")

</div>

Yes, macOS does not support either NVIDIA’s CUDA or the vendor-independent OpenCL interface. Apple has made its own proprietary metal performance shader (MPS) API available but it arrived very late to the party and it takes a while for frameworks and tools to adopt it.

Apple MPS is already supported at the level of AI frameworks, such as in pytorch. However, it is not supported (yet) in medical image computing frameworks (nnunet, MONAI, etc.). It is probably not a huge work for adding supporting for Apple MPS at higher levels, so it will eventually happen. I’ve submitted an issue to track the status of this in TotalSegmentator:

> <https://github.com/wasserth/TotalSegmentator/issues/39>
>
> Many users are asking about GPU acceleration on macOS. Pytorch officially suppor…ts MPS acceleration for MacOS 12.3+. Do you know if there is a plan for nn-unet to support MPS for prediction?
> 
> I guess only a number of small changes would be needed at the same places where you added support for CPU for prediction.
