# Use torchvulkan to enable gpu segmentations in totalsegmentator

**URL:** <https://discourse.slicer.org/t/use-torchvulkan-to-enable-gpu-segmentations-in-totalsegmentator/48679>\
**Category:** Development\
**Tags:** totalsegmentator\
**Created:** [November 2, 2026, 8:35pm UTC](https://discourse.slicer.org/t/use-torchvulkan-to-enable-gpu-segmentations-in-totalsegmentator/48679 "2026-11-02T20:35:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Vergara](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/alex_vergara/32/15205_2.png) [@Alex\_Vergara](https://discourse.slicer.org/u/Alex_Vergara)\
**Post date:** [November 2, 2026, 8:35pm UTC](https://discourse.slicer.org/t/use-torchvulkan-to-enable-gpu-segmentations-in-totalsegmentator/48679/1 "2026-11-02T20:35:23Z")

</div>

This is very specific to totalsegmentator, please @wasserth read the following

Currently, Total Segmentator uses torch that can use a nvidia card, if the user doesn’t have it it default to slow CPU. But there is a marvelous package [GitHub - zainsharief/torchvulkan: Cross-Platform Vulkan Backend for PyTorch · GitHub](https://github.com/zainsharief/torchvulkan) that I have tested it works really good, that adds Vulkan computation capabilities to torch, ENABLING ALL GPUs, not just nvidia. Two changes required:

```python
import torchvulkan
device = torch.device("vulkan" if torchvulkan.is_available() else "cpu")

```

That’s it, it would run a lot faster in AMD cards for instance, it also allows the use of MoltenVk in macos.
