GFPGAN icon indicating copy to clipboard operation
GFPGAN copied to clipboard

Solution of no module named : torchvision.transforms.functional_tensor

Open SINGHBP29 opened this issue 10 months ago • 4 comments

Use the Below command to solve the error

  1. pip install --upgrade pip
  2. pip install torchvision
  3. pip install torchvision==0.21.0
  4. pip install torchvision==0.21.0 --index-url https://download.pytorch.org/whl/cpu
  5. pip install torch==2.2.0 torchvision==0.17.0 --index-url https://download.pytorch.org/whl/cpu
  6. pip install --upgrade torch torchvision
  7. pip install torchvision==0.15.2
  8. pip 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.

Originally posted by @SINGHBP29 in #602

SINGHBP29 avatar Feb 07 '25 19:02 SINGHBP29

I have same problem.

h3clikejava avatar Feb 13 '25 09:02 h3clikejava

It solves the question in colab!

progress612 avatar Feb 14 '25 15:02 progress612

i just replaced: torchvision.transforms.functional_tensor with: torchvision.transforms.functional in the file/s: \venv\Lib\site-packages\basicsr\data*.py

and it worked perfectly)

abdulkarim1422 avatar Mar 04 '25 20:03 abdulkarim1422

pip install basicsr-fixed

devenu85 avatar Jun 11 '25 17:06 devenu85