xinntao / Real-ESRGAN

Real-ESRGAN aims at developing Practical Algorithms for General Image/Video Restoration.
BSD 3-Clause "New" or "Revised" License
28.45k stars 3.57k forks source link

ModuleNotFoundError #777

Open xreynaldimiki opened 7 months ago

xreynaldimiki commented 7 months ago

At the Inference stage I always get an error message (ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor) I have tried different file types but still get the same message. Screenshot_2024-04-08-00-41-10-691_com android chrome-edit

marcobarbierato commented 7 months ago

Edit torchvision.transforms.functional_tensor to torchvision.transforms.functional

xreynaldimiki commented 7 months ago

the output cannot be edited Screenshot_2024-04-08-22-49-51-063_com android chrome-edit

Omnibus-ai commented 7 months ago

torchvision==0.16.2 is working until the code in BasicSR is updated to utilize the newest TorchVision syntax

relevant Pull Request for BasicSR: https://github.com/XPixelGroup/BasicSR/pull/624

TorchVision 0.17.0+ https://github.com/pytorch/vision/releases/tag/v0.17.0

[transforms] We removed the torchvision.transforms.functional_tensor.py and torchvision.transforms.functional_pil.py modules, as these had been deprecated for a while. Use the public functionals from torchvision.transforms.v2.functional instead.