8000 fix bug in inference: RealESRGAN model is None · coder-wuyan/GFPGAN@ad13971 · GitHub
[go: up one dir, main page]

Skip to content

Commit ad13971

Browse files
committed
fix bug in inference: RealESRGAN model is None
1 parent 37237da commit ad13971

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

inference_gfpgan.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,13 @@ def main():
4646
'If you really want to use it, please modify the corresponding codes.')
4747
bg_upsampler = None
4848
else:
49+
from basicsr.archs.rrdbnet_arch import RRDBNet
4950
from realesrgan import RealESRGANer
51+
model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=2)
5052
bg_upsampler = RealESRGANer(
5153
scale=2,
5254
model_path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth',
55+
model=model,
5356
tile=args.bg_tile,
5457
tile_pad=10,
5558
pre_pad=0,

0 commit comments

Comments
 (0)
0