GFPGAN icon indicating copy to clipboard operation
GFPGAN copied to clipboard

Issue on RealESRGAn & SSL

Open Oleh0374 opened this issue 3 years ago • 5 comments

Hello. there is two problems:

  1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'"
  2. Error on check SSL certificate: "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, in do_open raise URLError(err)urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1122)>"

Oleh0374 avatar Oct 16 '22 16:10 Oleh0374

Hello. there is two problems:

1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'"

2. Error on check SSL certificate:
   "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, in do_open raise URLError(err)urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1122)>"

The problem seems to be that in your url is missing a dash in RealESRGAN...

Correct url is: https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth

netrunner-exe avatar Oct 16 '22 19:10 netrunner-exe

Hello. there is two problems:

1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'"

2. Error on check SSL certificate:
   "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, in do_open raise URLError(err)urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1122)>"

The problem seems to be that in your url is missing a dash in RealESRGAN...

Correct url is: https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth

Thank you for this correction. Another question. In this part of code 'RealESRGANer' can't be imported from module 'realesrgan' cause can't be resolved. I tried to found this but without success. May be you have an idea? Thanks.

if args.bg_upsampler == 'realesrgan':
    if not torch.cuda.is_available():  # CPU
        import warnings
        warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. '
                      'If you really want to use it, please modify the corresponding codes.')
        bg_upsampler = None
    else:
        from basicsr.archs.rrdbnet_arch import RRDBNet
        from realesrgan import RealESRGANer
        model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=2)
        bg_upsampler = RealESRGANer(
            scale=2,
            model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth',

Oleh0374 avatar Oct 17 '22 11:10 Oleh0374

Hello. there is two problems:

1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'"

2. Error on check SSL certificate:
   "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, in do_open raise URLError(err)urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1122)>"

The problem seems to be that in your url is missing a dash in RealESRGAN... Correct url is: https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth

Thank you for this correction. Another question. In this part of code 'RealESRGANer' can't be imported from module 'realesrgan' cause can't be resolved. I tried to found this but without success. May be you have an idea? Thanks.

if args.bg_upsampler == 'realesrgan':
    if not torch.cuda.is_available():  # CPU
        import warnings
        warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. '
                      'If you really want to use it, please modify the corresponding codes.')
        bg_upsampler = None
    else:
        from basicsr.archs.rrdbnet_arch import RRDBNet
        from realesrgan import RealESRGANer
        model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=2)
        bg_upsampler = RealESRGANer(
            scale=2,
            model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth',

To be honest, I do not understand what you mean. To import RealESRGANer you need to have it either installed on your system via pip (pip install realesrgan) or roughly speaking in your project was a folder named "realesrgan" with all the necessary dependencies. I don't know what you mean by this repository or some other one of your own?

netrunner-exe avatar Oct 17 '22 13:10 netrunner-exe

Hello. there is two problems:

1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'"

2. Error on check SSL certificate:
   "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, in do_open raise URLError(err)urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1122)>"

The problem seems to be that in your url is missing a dash in RealESRGAN... Correct url is: https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth

Thank you for this correction. Another question. In this part of code 'RealESRGANer' can't be imported from module 'realesrgan' cause can't be resolved. I tried to found this but without success. May be you have an idea? Thanks.

if args.bg_upsampler == 'realesrgan':
    if not torch.cuda.is_available():  # CPU
        import warnings
        warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. '
                      'If you really want to use it, please modify the corresponding codes.')
        bg_upsampler = None
    else:
        from basicsr.archs.rrdbnet_arch import RRDBNet
        from realesrgan import RealESRGANer
        model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=2)
        bg_upsampler = RealESRGANer(
            scale=2,
            model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth',

To be honest, I do not understand what you mean. To import RealESRGANer you need to have it either installed on your system via pip (pip install realesrgan) or roughly speaking in your project was a folder named "realesrgan" with all the necessary dependencies. I don't know what you mean by this repository or some other one of your own?

Thank you! ! it was so obvious ! my mistake... I didn't see the last requirement on the readme page.

Oleh0374 avatar Oct 17 '22 14:10 Oleh0374

Hello. there is two problems:

1. The url not exist: "model_path='https://github.com/xinntao/RealESRGAN/releases/download/v0.2.1/ReaESRGAN_x2plus.pth'"

2. Error on check SSL certificate:
   "File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, in do_open raise URLError(err)urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1122)>"

The problem seems to be that in your url is missing a dash in RealESRGAN... Correct url is: https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth

Thank you for this correction. Another question. In this part of code 'RealESRGANer' can't be imported from module 'realesrgan' cause can't be resolved. I tried to found this but without success. May be you have an idea? Thanks.

if args.bg_upsampler == 'realesrgan':
    if not torch.cuda.is_available():  # CPU
        import warnings
        warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. '
                      'If you really want to use it, please modify the corresponding codes.')
        bg_upsampler = None
    else:
        from basicsr.archs.rrdbnet_arch import RRDBNet
        from realesrgan import RealESRGANer
        model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=2)
        bg_upsampler = RealESRGANer(
            scale=2,
            model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth',

To be honest, I do not understand what you mean. To import RealESRGANer you need to have it either installed on your system via pip (pip install realesrgan) or roughly speaking in your project was a folder named "realesrgan" with all the necessary dependencies. I don't know what you mean by this repository or some other one of your own?

Thank you! ! it was so obvious ! my mistake... I didn't see the last requirement on the readme page.

Now it remains to find the solution for my second question for the SSL certificate..

Oleh0374 avatar Oct 17 '22 14:10 Oleh0374