diff options
author | missionfloyd <missionfloyd@users.noreply.github.com> | 2023-07-12 08:57:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-12 08:57:57 +0000 |
commit | e0218c4f22396a1be8aa4fde3db17c6fc85904eb (patch) | |
tree | 9cc918c09da3afaa4dfd93a823e5485006b9e5c6 /modules/call_queue.py | |
parent | 3fee3c34f1b01d21770ab0a226b432cdd8444792 (diff) | |
parent | 15adff3d6d5e8ba186b3df6eee8a8d774c8f3879 (diff) | |
download | stable-diffusion-webui-gfx803-e0218c4f22396a1be8aa4fde3db17c6fc85904eb.tar.gz stable-diffusion-webui-gfx803-e0218c4f22396a1be8aa4fde3db17c6fc85904eb.tar.bz2 stable-diffusion-webui-gfx803-e0218c4f22396a1be8aa4fde3db17c6fc85904eb.zip |
Merge branch 'dev' into img2img-save
Diffstat (limited to 'modules/call_queue.py')
-rw-r--r-- | modules/call_queue.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/call_queue.py b/modules/call_queue.py index 1b5e5273..3b94f8a4 100644 --- a/modules/call_queue.py +++ b/modules/call_queue.py @@ -1,3 +1,4 @@ +from functools import wraps
import html
import threading
import time
@@ -18,6 +19,7 @@ def wrap_queued_call(func): def wrap_gradio_gpu_call(func, extra_outputs=None):
+ @wraps(func)
def f(*args, **kwargs):
# if the first argument is a string that says "task(...)", it is treated as a job id
@@ -28,7 +30,7 @@ def wrap_gradio_gpu_call(func, extra_outputs=None): id_task = None
with queue_lock:
- shared.state.begin()
+ shared.state.begin(job=id_task)
progress.start_task(id_task)
try:
@@ -45,6 +47,7 @@ def wrap_gradio_gpu_call(func, extra_outputs=None): def wrap_gradio_call(func, extra_outputs=None, add_stats=False):
+ @wraps(func)
def f(*args, extra_outputs_array=extra_outputs, **kwargs):
run_memmon = shared.opts.memmon_poll_rate > 0 and not shared.mem_mon.disabled and add_stats
if run_memmon:
|