aboutsummaryrefslogtreecommitdiffstats
path: root/webui.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-08-26 17:41:16 +0000
committerGitHub <noreply@github.com>2022-08-26 17:41:16 +0000
commita51bedfb5ae2e1adeb7406b183305b2ea7530eac (patch)
treeb13b0d186b8e3fedb5f50d702813ce2ed5d96307 /webui.py
parent21bcbb945ead36cd9b969a1a957ce5ad754b6bad (diff)
parent92138df5ccfe0340b7c2a32f150437e533900f91 (diff)
downloadstable-diffusion-webui-gfx803-a51bedfb5ae2e1adeb7406b183305b2ea7530eac.tar.gz
stable-diffusion-webui-gfx803-a51bedfb5ae2e1adeb7406b183305b2ea7530eac.tar.bz2
stable-diffusion-webui-gfx803-a51bedfb5ae2e1adeb7406b183305b2ea7530eac.zip
Merge pull request #11 from Craftyawesome/fix-gfpgan-vram
Workaround for gfpgan OOM on 6GB
Diffstat (limited to 'webui.py')
-rw-r--r--webui.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/webui.py b/webui.py
index 2751d75a..b3375e98 100644
--- a/webui.py
+++ b/webui.py
@@ -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