diff options
author | Craftyawesome <craftyawesome.ak@gmail.com> | 2022-08-26 00:59:09 +0000 |
---|---|---|
committer | Craftyawesome <craftyawesome.ak@gmail.com> | 2022-08-26 16:56:04 +0000 |
commit | 92138df5ccfe0340b7c2a32f150437e533900f91 (patch) | |
tree | b13b0d186b8e3fedb5f50d702813ce2ed5d96307 /webui.py | |
parent | 21bcbb945ead36cd9b969a1a957ce5ad754b6bad (diff) | |
download | stable-diffusion-webui-gfx803-92138df5ccfe0340b7c2a32f150437e533900f91.tar.gz stable-diffusion-webui-gfx803-92138df5ccfe0340b7c2a32f150437e533900f91.tar.bz2 stable-diffusion-webui-gfx803-92138df5ccfe0340b7c2a32f150437e533900f91.zip |
fix gfpgan oom on 6GB
force a gc if out of memory
Diffstat (limited to 'webui.py')
-rw-r--r-- | webui.py | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -678,6 +678,7 @@ def process_images(outpath, func_init, func_sample, prompt, seed, sampler_index, 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
|