Skip to content

Commit

Permalink
fix(api): separate Real ESRGAN upsampler from GFPGAN stage (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Feb 12, 2023
1 parent ae8aa2e commit 82487f5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions api/onnx_web/chain/correct_gfpgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from ..device_pool import JobContext
from ..params import DeviceParams, ImageParams, StageParams, UpscaleParams
from ..utils import ServerContext, run_gc
from .upscale_resrgan import load_resrgan

logger = getLogger(__name__)

Expand All @@ -35,12 +34,10 @@ def load_gfpgan(

logger.debug("loading GFPGAN model from %s", face_path)

upsampler = load_resrgan(server, upscale, device, tile=stage.tile_size)

# TODO: find a way to pass the ONNX model to underlying architectures
gfpgan = GFPGANer(
arch="clean",
bg_upsampler=upsampler,
bg_upsampler=None,
channel_multiplier=2,
model_path=face_path,
upscale=upscale.face_outscale,
Expand Down

0 comments on commit 82487f5

Please sign in to comment.