diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-09-05 23:09:01 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-09-05 23:09:01 +0000 |
commit | a243bc7859b7ab92a28d28c11b0ed5525fa0d6ba (patch) | |
tree | 8da54414ef8918317a6b7eab14f6ada3bed47d0e /modules/shared.py | |
parent | b6763fb8847df5a5678f37137e7a702569e5c925 (diff) | |
download | stable-diffusion-webui-gfx803-a243bc7859b7ab92a28d28c11b0ed5525fa0d6ba.tar.gz stable-diffusion-webui-gfx803-a243bc7859b7ab92a28d28c11b0ed5525fa0d6ba.tar.bz2 stable-diffusion-webui-gfx803-a243bc7859b7ab92a28d28c11b0ed5525fa0d6ba.zip |
added progressbar
added an option to disable progressbar
added interrupt support to DDIM/PLMS
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 9 |
1 files changed, 9 insertions, 0 deletions
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):
|