1
0
Fork 0

fix(api): enable tiling when fixing faces after upscaling

This commit is contained in:
Sean Sube 2023-01-16 11:43:00 -06:00
parent b37f8cdd7d
commit ba3eff5c03
1 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ class ONNXNet():
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:
@ -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')