aboutsummaryrefslogtreecommitdiffstats
path: root/webui.py
diff options
context:
space:
mode:
authorrandom-thoughtss <116161560+random-thoughtss@users.noreply.github.com>2022-10-30 07:30:18 +0000
committerGitHub <noreply@github.com>2022-10-30 07:30:18 +0000
commit15468c993974ed30fb204792c9598dfa62088bbb (patch)
tree313bbeb9d55c752cacfaa08b769c873c3566ebaf /webui.py
parent39f55c3c35873bc7dd9792cb2155746a1c3d4292 (diff)
parent17a2076f72562b428052ee3fc8c43d19c03ecd1e (diff)
downloadstable-diffusion-webui-gfx803-15468c993974ed30fb204792c9598dfa62088bbb.tar.gz
stable-diffusion-webui-gfx803-15468c993974ed30fb204792c9598dfa62088bbb.tar.bz2
stable-diffusion-webui-gfx803-15468c993974ed30fb204792c9598dfa62088bbb.zip
Merge branch 'AUTOMATIC1111:master' into master
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