-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not running #589
Comments
you can try change “from torchvision.transforms.functional_tensor import rgb_to_grayscale” to “from torchvision.transforms.functional import rgb_to_grayscale” |
Use the following requirements.txt. I've checked the release date of GFPGAN and downloaded the similar date modules. In my conda env already worked: |
python inference_gfpgan.py -i inputs/whole_imgs -o results -v 1.4 -s 2
Traceback (most recent call last):
File "/home/MKN/GFPGAN/inference_gfpgan.py", line 7, in
from basicsr.utils import imwrite
File "/home/MKN/GFPGAN/myenv/lib/python3.12/site-packages/basicsr-1.4.2-py3.12.egg/basicsr/init.py", line 4, in
from .data import *
File "/home/MKN/GFPGAN/myenv/lib/python3.12/site-packages/basicsr-1.4.2-py3.12.egg/basicsr/data/init.py", line 22, in
_dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/MKN/GFPGAN/myenv/lib/python3.12/site-packages/basicsr-1.4.2-py3.12.egg/basicsr/data/realesrgan_dataset.py", line 11, in
from basicsr.data.degradations import circular_lowpass_kernel, random_mixed_kernels
File "/home/MKN/GFPGAN/myenv/lib/python3.12/site-packages/basicsr-1.4.2-py3.12.egg/basicsr/data/degradations.py", line 8, in
from torchvision.transforms.functional_tensor import rgb_to_grayscale
ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'python inference_gfpgan.py -i inputs/whole_imgs -o results -v 1.4 -s 2
Traceback (most recent call last):
File "/home/MKN/GFPGAN/inference_gfpgan.py", line 7, in
from basicsr.utils import imwrite
File "/home/MKN/GFPGAN/myenv/lib/python3.12/site-packages/basicsr-1.4.2-py3.12.egg/basicsr/init.py", line 4, in
from .data import *
File "/home/MKN/GFPGAN/myenv/lib/python3.12/site-packages/basicsr-1.4.2-py3.12.egg/basicsr/data/init.py", line 22, in
_dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/MKN/GFPGAN/myenv/lib/python3.12/site-packages/basicsr-1.4.2-py3.12.egg/basicsr/data/realesrgan_dataset.py", line 11, in
from basicsr.data.degradations import circular_lowpass_kernel, random_mixed_kernels
File "/home/MKN/GFPGAN/myenv/lib/python3.12/site-packages/basicsr-1.4.2-py3.12.egg/basicsr/data/degradations.py", line 8, in
from torchvision.transforms.functional_tensor import rgb_to_grayscale
ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'
The text was updated successfully, but these errors were encountered: