aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-01-04 16:05:42 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-01-04 16:05:42 +0300
commit1cfd8aec4ae5a6ca1afd67b44cb4ef6dd14d8c34 (patch)
tree00a491de8a35189306832c85697b0874a10de6ee
parentc923de0e0598dfb0ad7c5abc6cdab6cd04045320 (diff)
make it possible to work with opts.show_progress_every_n_steps = -1 with medvram
-rw-r--r--modules/shared.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/shared.py b/modules/shared.py
index 4fcc6edd..54a6ba23 100644
--- a/modules/shared.py
+++ b/modules/shared.py
@@ -214,12 +214,13 @@ class State:
"""sets self.current_image from self.current_latent if enough sampling steps have been made after the last call to this"""
def set_current_image(self):
+ if not parallel_processing_allowed:
+ return
+
if self.sampling_step - self.current_image_sampling_step >= opts.show_progress_every_n_steps and opts.show_progress_every_n_steps > 0:
self.do_set_current_image()
def do_set_current_image(self):
- if not parallel_processing_allowed:
- return
if self.current_latent is None:
return
@@ -231,6 +232,7 @@ class State:
self.current_image_sampling_step = self.sampling_step
+
state = State()
artist_db = modules.artists.ArtistsDatabase(os.path.join(script_path, 'artists.csv'))