From ad1397180d232561227d2c64b60438af44e36d5a Mon Sep 17 00:00:00 2001 From: Xintao Date: Sun, 12 Dec 2021 22:46:07 +0800 Subject: [PATCH] fix bug in inference: RealESRGAN model is None --- inference_gfpgan.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inference_gfpgan.py b/inference_gfpgan.py index 45e2744..a426cfc 100644 --- a/inference_gfpgan.py +++ b/inference_gfpgan.py @@ -46,10 +46,13 @@ def main(): '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', + model=model, tile=args.bg_tile, tile_pad=10, pre_pad=0,