How to solve Pytorch version error in TotalSegmentator using CPU

Himm this is interesting. I just tried on my Mac, and while it started downloading v 2.2.1, it ended up installing 1.8. Not sure why. @lassoan

Install PyTorch using light-the-torch with arguments: ['install', 'torch', 'torchvision', '--pytorch-computation-backend=cpu']
Collecting torch
  Downloading https://download.pytorch.org/whl/cpu/torch-2.2.1-cp39-none-macosx_10_9_x86_64.whl (151.0 MB)

Collecting torchvision
  Using cached https://download.pytorch.org/whl/torchvision-0.9.1-cp39-cp39-macosx_10_9_x86_64.whl (13.1 MB)
Requirement already satisfied: filelock in /Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages (from torch) (3.13.1)
Requirement already satisfied: typing-extensions>=4.8.0 in /Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages (from torch) (4.8.0)
Requirement already satisfied: sympy in /Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages (from torch) (1.12)
Requirement already satisfied: networkx in /Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages (from torch) (3.2.1)
Requirement already satisfied: jinja2 in /Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages (from torch) (3.1.3)
Requirement already satisfied: fsspec in /Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages (from torch) (2024.2.0)
Requirement already satisfied: numpy in /Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages (from torchvision) (1.26.1)
Collecting torch
  Using cached https://download.pytorch.org/whl/cpu/torch-1.8.1-cp39-none-macosx_10_9_x86_64.whl (119.6 MB)
Requirement already satisfied: pillow>=4.1.1 in /Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages (from torchvision) (10.1.0)
Requirement already satisfied: MarkupSafe>=2.0 in /Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages (from jinja2->torch) (2.1.5)
Requirement already satisfied: mpmath>=0.19 in /Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages (from sympy->torch) (1.3.0)
Installing collected packages: torch, torchvision
  WARNING: The scripts convert-caffe2-to-onnx and convert-onnx-to-caffe2 are installed in '/Applications/Slicer.app/Contents/lib/Python/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed torch-1.8.1 torchvision-0.9.1