Runtime error when Duplicating a Space
Already tried to manually set the version for torchvision and torch in requirements.txt to latest but still the same. I’m just curious why it’s giving me this error. Any help is greatly appreciatedruntime errorExit code: 1. Reason: Traceback (most recent call last):File “/home/user/app/app.py”, line 6, infrom basicsr.archs.srvgg_arch import SRVGGNetCompactFile “/usr/local/lib/python3.10/site-packages/basicsr/init.py”, line 4, infrom .data import *File “/usr/local/lib/python3.10/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 “/usr/local/lib/python3.10/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 “/usr/local/lib/python3.10/importlib/init.py”, line 126, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)File “/usr/local/lib/python3.10/site-packages/basicsr/data/realesrgan_dataset.py”, line 11, infrom basicsr.data.degradations import circular_lowpass_kernel, random_mixed_kernelsFile “/usr/local/lib/python3.10/site-packages/basicsr/data/degradations.py”, line 8, infrom torchvision.transforms.functional_tensor import rgb_to_grayscaleModuleNotFoundError: No module named ‘torchvision.transforms.functional_tensor’
2024-11-17T02:08:41Z
It seems that thebasicsrlibrary in pip is too old and is causing a problem. Possible workarounds include: fixing the torch and torchvision versions to an older version, or loosening the conditions. Using the github version ofbasicsr.If you want to solve the problem, I think the only way is to fork thebasicsrgithub and redo the settings for yourself.git+https://github.com/XPixelGroup/BasicSR in requiements.txt
or
pip install git+https://github.com/XPixelGroup/BasicSRPyPIbasicsrOpen Source Image and Video Super-Resolution Toolboxgithub.comGitHub - XPixelGroup/BasicSR: Open Source Image and Video Restoration Toolbox...Open Source Image and Video Restoration Toolbox for Super-resolution, Denoise, Deblurring, etc. Currently, it includes EDSR, RCAN, SRResNet, SRGAN, ESRGAN, EDVR, BasicVSR, SwinIR, ECBSR, etc. Also support StyleGAN2, DFDNet.
2024-11-17T02:24:27Z
Yeah i don’t think i can mamage that in my current knowledge, but yeah i have found out that basicsr is causing these problems for some but when i try to edit requirements txt and set basicsr==1.3.5 the build process doesn’t proceed. Thanks for sharing your knowledge, i really appreciate it
2024-11-17T02:59:01Z
Trygit+https://github.com/XPixelGroup/BasicSRornew-basicsrinsteadbasicsr==1.3.5Well, a lot of people are having trouble with it. So there are a few workarounds. Someone made them.
2024-11-17T05:03:51Z
Thanks for your help, unfortunately it still downloads the basicsr 1.4.2 upon checking the logs. I think it’s because Realesrgan and gfpgan depend on it.huggingface.coImage Face Upscale Restoration-GFPGAN - a Hugging Face Space by PotatoEnrageDiscover amazing ML apps made by the communityI have made that duplicate space public if you wanna contribute changes to that Space and if fixes that issue. Just kinda curious and weird that it fails when it’s a duplicate of the working one. Thanks again
2024-11-17T05:30:52Z
The service that was running had probably not been restarted for several years, and it was probably started because there were no problems withthe latest libraries at the time.I made quite a few changes and got it working. Try merge it. This is an antique…huggingface.coPotatoEnrage/Image_Face_Upscale_Restoration-GFPGAN · Upload 3 filesWe’re on a journey to advance and democratize artificial intelligence through open source and open science.
2024-11-17T05:47:28Z
Amazing, you are so helpful. I checked it and yeah it works now. Thanks for sharing your info, this will definitely help me out in the future, thank you so much@John6666
2024-11-17T17:48:23Z
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.