added progressbar

added an option to disable progressbar
added interrupt support to DDIM/PLMS
This commit is contained in:
AUTOMATIC
2022-09-06 02:09:01 +03:00
parent b6763fb884
commit a243bc7859
11 changed files with 170 additions and 9 deletions

View File

@@ -53,6 +53,7 @@ def load_model_from_config(config, ckpt, verbose=False):
cached_images = {}
def run_extras(image, gfpgan_strength, upscaling_resize, extras_upscaler_1, extras_upscaler_2, extras_upscaler_2_visibility):
processing.torch_gc()
@@ -121,10 +122,16 @@ queue_lock = threading.Lock()
def wrap_gradio_gpu_call(func):
def f(*args, **kwargs):
shared.state.sampling_step = 0
shared.state.job_count = 1
shared.state.job_no = 0
with queue_lock:
res = func(*args, **kwargs)
shared.state.job = ""
shared.state.job_count = 0
return res