diff options
author | WDevelopsWebApps <97454358+WDevelopsWebApps@users.noreply.github.com> | 2022-09-29 10:19:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-29 10:19:13 +0000 |
commit | f28ce3e3a17ccd9b4a03317031a4e3caa1a3088f (patch) | |
tree | 9f57cde73305695cce558cd8a172b4974a02ee1d /webui.py | |
parent | 03ee67bfd34b9e872b33eb05fef5db83410b16f3 (diff) | |
parent | be5555fce4612fdfb4a06e831e3f1a8d055fdf9a (diff) | |
download | stable-diffusion-webui-gfx803-f28ce3e3a17ccd9b4a03317031a4e3caa1a3088f.tar.gz stable-diffusion-webui-gfx803-f28ce3e3a17ccd9b4a03317031a4e3caa1a3088f.tar.bz2 stable-diffusion-webui-gfx803-f28ce3e3a17ccd9b4a03317031a4e3caa1a3088f.zip |
Merge branch 'master' into saving
Diffstat (limited to 'webui.py')
-rw-r--r-- | webui.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1,6 +1,7 @@ import os
import threading
+from modules import devices
from modules.paths import script_path
import signal
@@ -47,6 +48,8 @@ def wrap_queued_call(func): def wrap_gradio_gpu_call(func):
def f(*args, **kwargs):
+ devices.torch_gc()
+
shared.state.sampling_step = 0
shared.state.job_count = -1
shared.state.job_no = 0
@@ -62,6 +65,8 @@ def wrap_gradio_gpu_call(func): shared.state.job = ""
shared.state.job_count = 0
+ devices.torch_gc()
+
return res
return modules.ui.wrap_gradio_call(f)
|