Skip to content

Commit

Permalink
fix(api): use correct part of the gfpgan output
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Dec 31, 2023
1 parent c6718a3 commit de8ab6f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/onnx_web/chain/correct_gfpgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ def run(
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)

0 comments on commit de8ab6f

Please sign in to comment.