Skip to content

Commit

Permalink
Merge pull request #11 from Craftyawesome/fix-gfpgan-vram
Browse files Browse the repository at this point in the history
Workaround for gfpgan OOM on 6GB
  • Loading branch information
AUTOMATIC1111 committed Aug 26, 2022
2 parents 21bcbb9 + 92138df commit a51bedf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ def infotext():
x_sample = x_sample.astype(np.uint8)

if use_GFPGAN and GFPGAN is not None:
torch_gc()
cropped_faces, restored_faces, restored_img = GFPGAN.enhance(x_sample, has_aligned=False, only_center_face=False, paste_back=True)
x_sample = restored_img

Expand Down

0 comments on commit a51bedf

Please sign in to comment.