For people having pytorch\xformers\torchvision.transforms.functional_tensor error
Google Colab has updated its env, so we need to fix a few things for it to work.
For people having pytorch\xformers error (xFormers can't load C++/CUDA extensions) and all sorts of import errors like ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor':
1) run Prepare folders & Install cell
2) check "skip install" after running it
3) add a new code cell below it with this code:
For people having pytorch\xformers error (xFormers can't load C++/CUDA extensions) and all sorts of import errors like ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor':
1) run Prepare folders & Install cell
2) check "skip install" after running it
3) add a new code cell below it with this code:
!pip uninstall torch xformers -y
!python -m pip install torch==2.0.1 torchvision==0.15.2 --extra-index-url https://download.pytorch.org/whl/cu118 xformers==0.0.21
!python -m pip install torch==2.0.1 torchvision==0.15.2 --extra-index-url https://download.pytorch.org/whl/cu118 xformers==0.0.21
and run it.
4) delete or comment that newly added cell to make sure you don't run it every time you restart the env.
5) restart your env and run all as usual
4) delete or comment that newly added cell to make sure you don't run it every time you restart the env.
5) restart your env and run all as usual