Skip to content
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

Error trying to run in Interference on Colab #801

Open
BGCP opened this issue May 10, 2024 · 1 comment
Open

Error trying to run in Interference on Colab #801

BGCP opened this issue May 10, 2024 · 1 comment

Comments

@BGCP
Copy link

BGCP commented May 10, 2024

I'm not sure on how to correct this error when I try to execute the interference on google colabs
Traceback (most recent call last): File "/content/Real-ESRGAN/inference_realesrgan.py", line 5, in <module> from basicsr.archs.rrdbnet_arch import RRDBNet File "/usr/local/lib/python3.10/dist-packages/basicsr/__init__.py", line 4, in <module> from .data import * File "/usr/local/lib/python3.10/dist-packages/basicsr/data/__init__.py", line 22, in <module> _dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames] File "/usr/local/lib/python3.10/dist-packages/basicsr/data/__init__.py", line 22, in <listcomp> _dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames] File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/usr/local/lib/python3.10/dist-packages/basicsr/data/realesrgan_dataset.py", line 11, in <module> from basicsr.data.degradations import circular_lowpass_kernel, random_mixed_kernels File "/usr/local/lib/python3.10/dist-packages/basicsr/data/degradations.py", line 8, in <module> from torchvision.transforms.functional_tensor import rgb_to_grayscale ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'

@KatayR
Copy link

KatayR commented May 14, 2024

Change first cell to:

# Clone Real-ESRGAN and enter the Real-ESRGAN
!git clone https://github.com/xinntao/Real-ESRGAN.git
%cd Real-ESRGAN
# Set up the environment
!pip install basicsr
!pip install facexlib
!pip install gfpgan
!pip install -r requirements.txt
!pip install torchvision==0.16.2
!python setup.py develop

and third cell to:
!python inference_realesrgan.py -n RealESRGAN_x4plus -i upload --outscale 3.5 --face_enhance --tile 400

it took me hours to fix it but finally made it work with these

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants