From a243bc7859b7ab92a28d28c11b0ed5525fa0d6ba Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Tue, 6 Sep 2022 02:09:01 +0300 Subject: added progressbar added an option to disable progressbar added interrupt support to DDIM/PLMS --- modules/shared.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'modules/shared.py') diff --git a/modules/shared.py b/modules/shared.py index 4e36df37..53861daf 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -42,10 +42,18 @@ batch_cond_uncond = cmd_opts.always_batch_cond_uncond or not (cmd_opts.lowvram o class State: interrupted = False job = "" + job_no = 0 + job_count = 0 + sampling_step = 0 + sampling_steps = 0 def interrupt(self): self.interrupted = True + def nextjob(self): + self.job_no += 1 + self.sampling_step = 0 + state = State() artist_db = modules.artists.ArtistsDatabase(os.path.join(script_path, 'artists.csv')) @@ -89,6 +97,7 @@ class Options: "ESRGAN_tile_overlap": OptionInfo(8, "Tile overlap, in pixels for ESRGAN upscaling. Low values = visible seam.", gr.Slider, {"minimum": 0, "maximum": 48, "step": 1}), "random_artist_categories": OptionInfo([], "Allowed categories for random artists selection when using the Roll button", gr.CheckboxGroup, {"choices": artist_db.categories()}), "upscale_at_full_resolution_padding": OptionInfo(16, "Inpainting at full resolution: padding, in pixels, for the masked region.", gr.Slider, {"minimum": 0, "maximum": 128, "step": 4}), + "show_progressbar": OptionInfo(True, "Show progressbar"), } def __init__(self): -- cgit v1.2.3