aboutsummaryrefslogtreecommitdiffstats
path: root/modules/shared.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-06 20:10:12 +0000
committerAUTOMATIC <16777216c@gmail.com>2022-09-06 20:10:12 +0000
commit7ce7fb01e035a7ba8ca9cb35784cd75cca3d99fd (patch)
treec5b60ee07477249577260b421d52de9840dfc1ef /modules/shared.py
parent0bfa0d4381c65077ffa7bd014040813dbad84fed (diff)
downloadstable-diffusion-webui-gfx803-7ce7fb01e035a7ba8ca9cb35784cd75cca3d99fd.tar.gz
stable-diffusion-webui-gfx803-7ce7fb01e035a7ba8ca9cb35784cd75cca3d99fd.tar.bz2
stable-diffusion-webui-gfx803-7ce7fb01e035a7ba8ca9cb35784cd75cca3d99fd.zip
fix for live progress breaking lowvram and medvram optimizations
Diffstat (limited to 'modules/shared.py')
-rw-r--r--modules/shared.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/shared.py b/modules/shared.py
index 5eac3317..49f17145 100644
--- a/modules/shared.py
+++ b/modules/shared.py
@@ -38,7 +38,7 @@ cpu = torch.device("cpu")
gpu = torch.device("cuda")
device = gpu if torch.cuda.is_available() else cpu
batch_cond_uncond = cmd_opts.always_batch_cond_uncond or not (cmd_opts.lowvram or cmd_opts.medvram)
-
+parallel_processing_allowed = not cmd_opts.lowvram and not cmd_opts.medvram
class State:
interrupted = False
@@ -49,7 +49,8 @@ class State:
sampling_steps = 0
current_latent = None
current_image = None
- current_progress_index = 0
+ current_image_sampling_step = 0
+
def interrupt(self):
self.interrupted = True
@@ -57,6 +58,7 @@ class State:
def nextjob(self):
self.job_no += 1
self.sampling_step = 0
+ self.current_image_sampling_step = 0
state = State()
@@ -103,7 +105,7 @@ class Options:
"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"),
- "show_progress_every_n_steps": OptionInfo(0, "Show show image creation progress every N progress pudates. Set 0 to disable.", gr.Slider, {"minimum": 0, "maximum": 32, "step": 1}),
+ "show_progress_every_n_steps": OptionInfo(0, "Show show image creation progress every N sampling steps. Set 0 to disable.", gr.Slider, {"minimum": 0, "maximum": 32, "step": 1}),
}
def __init__(self):