ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'
Traceback (most recent call last):
File "/content/GFPGAN/inference_gfpgan.py", line 7, in
Use the Below command to solve the error
pip install --upgrade pippip install torchvisionpip install torchvision==0.21.0pip install torchvision==0.21.0 --index-url https://download.pytorch.org/whl/cpupip install torch==2.2.0 torchvision==0.17.0 --index-url https://download.pytorch.org/whl/cpupip install --upgrade torch torchvisionpip install torchvision==0.15.2pip install git+https://github.com/facebookresearch/pytorchvideo
These commands show attempts to:
- Upgrade pip.
- Install the latest torchvision.
- Install specific versions of torchvision (0.21.0, 0.17.0, and 0.15.2).
- Install torchvision with a specified index URL for CPU.
- Install PyTorch and torchvision together with a specified index URL for CPU.
- Install PyTorchVideo from GitHub.
Thank you. I'll try it.
It works! Thanks @SINGHBP29
I think it's better to fix the core problem than trying to play with package versions, since it is likely to cause other problems. The problem is in basicsr package and it's fixed already. Install it using
pip install basicsr-fixed
instead of pip install basicsr
I had to use both solutions,
pip install basicsr-fixed
thanks @drkovalskyi
and this.
thanks @abdulkarim1422
I think it's better to fix the core problem than trying to play with package versions, since it is likely to cause other problems. The problem is in
basicsrpackage and it's fixed already. Install it usingpip install basicsr-fixedinstead of
pip install basicsr
It works properly.
Thank you @drkovalskyi, that fixed the issue!
I think it's better to fix the core problem than trying to play with package versions, since it is likely to cause other problems. The problem is in
basicsrpackage and it's fixed already. Install it usingpip install basicsr-fixedinstead of
pip install basicsr
thanks