1
0
Fork 0

fix(api): variable name in GFPGAN

This commit is contained in:
Sean Sube 2023-01-31 08:24:10 -06:00
parent 39f84c4a49
commit 1ca7edb4a8
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 2 additions and 2 deletions

View File

@ -66,14 +66,14 @@ def correct_gfpgan(
) -> Image.Image:
if upscale.correction_model is None:
logger.warn('no face model given, skipping')
return image
return source_image
logger.info('correcting faces with GFPGAN model: %s', upscale.correction_model)
gfpgan = load_gfpgan(ctx, upscale, upsampler=upsampler)
output = np.array(source_image)
_, _, output = gfpgan.enhance(
image, has_aligned=False, only_center_face=False, paste_back=True, weight=upscale.face_strength)
source_image, has_aligned=False, only_center_face=False, paste_back=True, weight=upscale.face_strength)
output = Image.fromarray(output, 'RGB')
return output