Trying to install the “python-torchvision-rocm” Package from the AUR as a prerequisite to get my AMD RX 6600XT to work with Automatic 1111 Stable Diffusion Web UI; however I get a build error that outputs this:
[100%] Linking CXX shared library libtorchvision.so
[100%] Built target torchvision
Traceback (most recent call last):
File "/home/username/python-torchvision-rocm/src/vision-0.14.1/setup.py", line 9, in <module>
import torch
ModuleNotFoundError: No module named 'torch'
==> ERROR: A failure occurred in build().
Aborting...
Apparently those instructions and the specific instructions for AMD GPUs for Arch/Arch-based Linux Distros in the Github wiki weren’t working for me when I tried run webui.sh after using several of the AMD/Linux install methods; it outputted for me when using my RX 6600XT the following:
AssertionError: Torch is not able to use GPU; add -- skiptorch-cuda-test to COMMANDLINE_ARGS variable to disable this check
It essence, the torch and the application can’t see the AMD GPU.
Anyways, I found a workaround from Reddit after searching around for a few hours. After git cloning Automatic1111 Stable Diffusion UI, run this command inside the cloned directory:
The application should be able to work with an AMD GPU now.
Although, I came originally looking for a solution to fix the python-torchvision-rocm build error … I figured out how to get to the end goal which was to get Automatic 1111 Stable Diffusion Web UI running; I guess I’ll mark this fixed.