Solution of no module named : torchvision.transforms.functional_tensor #519

Open
opened 2026-01-29 21:48:29 +00:00 by claunia · 4 comments
Owner

Originally created by @SINGHBP29 on GitHub (Feb 7, 2025).

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

Originally created by @SINGHBP29 on GitHub (Feb 7, 2025). > 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](https://github.com/TencentARC/GFPGAN/issues/602#issuecomment-2643775774)_
Author
Owner

@h3clikejava commented on GitHub (Feb 13, 2025):

I have same problem.

@h3clikejava commented on GitHub (Feb 13, 2025): I have same problem.
Author
Owner

@progress612 commented on GitHub (Feb 14, 2025):

It solves the question in colab!

@progress612 commented on GitHub (Feb 14, 2025): It solves the question in colab!
Author
Owner

@abdulkarim1422 commented on GitHub (Mar 4, 2025):

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 commented on GitHub (Mar 4, 2025): 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)
Author
Owner

@devenu85 commented on GitHub (Jun 11, 2025):

pip install basicsr-fixed

@devenu85 commented on GitHub (Jun 11, 2025): pip install basicsr-fixed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#519