Open CrafterRa opened 4 months ago
(for author of issue)
locate to C:\Users\rapha\anaconda3\Lib\site-packages\basicsr\data\
, open degradations.py
(for those who opened issue for solution)
Open %appdata%
, locate to Python
, open your Python <version>
(inside Python
folder) > site-packages
> basicsr
> data
> degradations.py
(with any text editor)
edit:
from torchvision.transforms.functional_tensor import rgb_to_grayscale
to:
from torchvision.transforms.functional import rgb_to_grayscale
(changes: _tensor
removed)
I Have installed all requirements and tried to start the file but it gives me this error:
ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor
I have installed torchvision and Nvidia Cuda and i own an Nvidia gpu.
I am using: Windows 11 Pro 23H2, Anaconda3 24.5.0, Python 3.12.4, and cuda_12.5.1_555.85.
In order to reproduce this error:
The logs are:
Traceback (most recent call last): File "D:\SteamLibrary\steamapps\common\GarrysModRTX\OctoTex-master\webui.py", line 6, in
import functions
File "D:\SteamLibrary\steamapps\common\GarrysModRTX\OctoTex-master\functions.py", line 4, in
import upscale as upscaler
File "D:\SteamLibrary\steamapps\common\GarrysModRTX\OctoTex-master\upscale.py", line 2, in
import ai.RealESRGAN.upscaler
File "D:\SteamLibrary\steamapps\common\GarrysModRTX\OctoTex-master\ai\RealESRGAN\upscaler.py", line 5, in
from basicsr.archs.rrdbnet_arch import RRDBNet
File "C:\Users\rapha\anaconda3\Lib\site-packages\basicsr__init.py", line 4, in
from .data import *
File "C:\Users\rapha\anaconda3\Lib\site-packages\basicsr\data\ init.py", line 22, in
_dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\rapha\anaconda3\Lib\importlib\ init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\rapha\anaconda3\Lib\site-packages\basicsr\data\realesrgan_dataset.py", line 11, in
from basicsr.data.degradations import circular_lowpass_kernel, random_mixed_kernels
File "C:\Users\rapha\anaconda3\Lib\site-packages\basicsr\data\degradations.py", line 8, in
from torchvision.transforms.functional_tensor import rgb_to_grayscale
ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'