For people having pytorch\xformers\torchvision.transforms.functional_tensor error (Patreon)
Published:
2024-03-14 15:33:10
Edited:
2024-03-18 09:24:33
Imported:
2024-08
Content
Google Colab has updated its env, so we need to fix a few things for it to work.
Installers for v0.20+ have been updated. Those notebooks should work without any manual fixes.
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
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