make it possible to work with opts.show_progress_every_n_steps = -1 with medvram

Этот коммит содержится в:
AUTOMATIC 2023-01-04 16:05:42 +03:00
родитель c923de0e05
Коммит 1cfd8aec4a

Просмотреть файл

@ -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'))