Skip to content

Commit

Permalink
fix(api): enable tiling when fixing faces after upscaling
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 16, 2023
1 parent b37f8cd commit ba3eff5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/onnx_web/upscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def to(self, device):
return self


def make_resrgan(model_path):
def make_resrgan(model_path, tile=0):
model_path = path.join(model_path, resrgan_name + '.pth')
if not path.isfile(model_path):
for url in resrgan_url:
Expand Down Expand Up @@ -114,7 +114,7 @@ def upscale_resrgan(source_image: Image, model_path: str, faces=True) -> Image:
output, _ = upsampler.enhance(image, outscale=outscale)

if faces:
output = upscale_gfpgan(output, upsampler)
output = upscale_gfpgan(output, make_resrgan(model_path, 512))

return Image.fromarray(output, 'RGB')

Expand Down

0 comments on commit ba3eff5

Please sign in to comment.