numz / sd-wav2lip-uhq

Wav2Lip UHQ extension for Automatic1111
Apache License 2.0
1.16k stars 158 forks source link

RuntimeError: Couldn't load custom C++ ops. This can happen if your PyTorch and torchvision versions are incompatible, or if you had errors while compiling torchvision from source. #84

Closed ABZig closed 7 months ago

ABZig commented 8 months ago

I am getting a Runtime error while running the web UI using ./webui.sh. Error is like,

RuntimeError: Couldn't load custom C++ ops. This can happen if your PyTorch and torchvision versions are incompatible, or if you had errors while compiling torchvision from source. For further information on the compatible versions, check https://github.com/pytorch/vision#installation for the compatibility matrix. Please check your PyTorch version with torch.version and your torchvision version with torchvision.version and verify if they are compatible, if not please reinstall torchvision so that it matches your PyTorch install.

I have tried many solutions to run it Errorlessly. But in the end, I was stuck in this error. Tried Solutions,

Hank512 commented 7 months ago

me too

ABZig commented 7 months ago

During the runtime of the build.sh file, it is taking the default Python version set in the system. You need to set Python version to 3.10 at least. You can install pyenv in Ubuntu and follow the correct steps to install version 3.10 and set it globally. So, that build takes the latest version (https://stackoverflow.com/questions/62898911/how-to-downgrade-python-version-from-3-8-to-3-7-mac).