aboutsummaryrefslogtreecommitdiffstats
path: root/webui.py
diff options
context:
space:
mode:
authorFampai <>2022-10-31 13:54:51 +0000
committerFampai <>2022-10-31 13:54:51 +0000
commit3b0127e698a2eeb913437bce0b25b478fb06ff11 (patch)
treee0894e49eb0d7609b12d4e4f3a71fd979830b29c /webui.py
parent006756f9cd6258eae418e9209cfc13f940ec53e1 (diff)
parent9b384dfb5c05129f50cc3f0262f89e8b788e5cf3 (diff)
downloadstable-diffusion-webui-gfx803-3b0127e698a2eeb913437bce0b25b478fb06ff11.tar.gz
stable-diffusion-webui-gfx803-3b0127e698a2eeb913437bce0b25b478fb06ff11.tar.bz2
stable-diffusion-webui-gfx803-3b0127e698a2eeb913437bce0b25b478fb06ff11.zip
Merge branch 'master' of https://github.com/AUTOMATIC1111/stable-diffusion-webui into TI_optimizations
Diffstat (limited to 'webui.py')
-rw-r--r--webui.py19
1 files changed, 3 insertions, 16 deletions
diff --git a/webui.py b/webui.py
index ade7334b..29530872 100644
--- a/webui.py
+++ b/webui.py
@@ -46,26 +46,13 @@ def wrap_queued_call(func):
def wrap_gradio_gpu_call(func, extra_outputs=None):
def f(*args, **kwargs):
- devices.torch_gc()
-
- shared.state.sampling_step = 0
- shared.state.job_count = -1
- shared.state.job_no = 0
- shared.state.job_timestamp = shared.state.get_job_timestamp()
- shared.state.current_latent = None
- shared.state.current_image = None
- shared.state.current_image_sampling_step = 0
- shared.state.skipped = False
- shared.state.interrupted = False
- shared.state.textinfo = None
+
+ shared.state.begin()
with queue_lock:
res = func(*args, **kwargs)
- shared.state.job = ""
- shared.state.job_count = 0
-
- devices.torch_gc()
+ shared.state.end()
return res