1
0
Fork 0

fix(api): use correct part of the gfpgan output

This commit is contained in:
Sean Sube 2023-12-31 07:04:35 -06:00
parent c6718a3e3b
commit de8ab6f1c9
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 5 additions and 5 deletions

View File

@ -73,15 +73,15 @@ class CorrectGFPGANStage(BaseStage):
device = worker.get_device()
gfpgan = self.load(server, stage, upscale, device)
outputs = [
gfpgan.enhance(
outputs = []
for source in sources.as_numpy():
cropped, restored, result = gfpgan.enhance(
source,
has_aligned=False,
only_center_face=False,
paste_back=True,
weight=upscale.face_strength,
)
for source in sources.as_numpy()
]
outputs.append(result)
return StageResult(images=outputs)
return StageResult.from_arrays(outputs)