diff --git a/api/onnx_web/serve.py b/api/onnx_web/serve.py index ffc7bbb6..d9afbfd9 100644 --- a/api/onnx_web/serve.py +++ b/api/onnx_web/serve.py @@ -99,7 +99,6 @@ mask_filters = { upscale_models = [ 'RealESRGAN_x4plus', 'GFPGANv1.3', - # TODO: convert GFPGAN # 'https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth', ] diff --git a/api/onnx_web/upscale.py b/api/onnx_web/upscale.py index 06abd16d..1c4c01aa 100644 --- a/api/onnx_web/upscale.py +++ b/api/onnx_web/upscale.py @@ -167,8 +167,10 @@ def upscale_gfpgan(ctx: ServerContext, params: UpscaleParams, image, upsampler=N if upsampler is None: upsampler = make_resrgan(ctx, params, tile=512) + face_path = path.join(ctx.model_path, '%s.pth' % (params.face_model)) # TODO: convert to ONNX + face_enhancer = GFPGANer( - model_path=params.face_model, + model_path=face_path, upscale=params.outscale, arch='clean', channel_multiplier=2,