From ed8b8b3b8c4f5bea89a2dc32fb48c83a123a11cd Mon Sep 17 00:00:00 2001 From: RnDMonkey Date: Fri, 23 Sep 2022 22:09:59 -0700 Subject: Fix to XY_Grid script console progress bar and other progress bar improvements (#890) Fix to XY_Grid script console progress bar and other progress bar improvements #890 --- modules/processing.py | 2 +- modules/shared.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/processing.py b/modules/processing.py index 0246e094..a899566d 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -338,7 +338,7 @@ def process_images(p: StableDiffusionProcessing) -> Processed: comments[comment] = 1 if p.n_iter > 1: - shared.state.job = f"Batch {n+1} out of {p.n_iter}" + shared.state.job = f"Image {n+1} out of {p.n_iter}; Batch {(shared.state.job_no // p.n_iter) + 1} of {shared.state.job_count // p.n_iter}" samples_ddim = p.sample(conditioning=c, unconditional_conditioning=uc, seeds=seeds, subseeds=subseeds, subseed_strength=p.subseed_strength) if state.interrupted: diff --git a/modules/shared.py b/modules/shared.py index 667c3441..7bad7a6d 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -307,6 +307,13 @@ class TotalTQDM: self.reset() self._tqdm.update() + def updateTotal(self, new_total): + if not opts.multiple_tqdm: + return + if self._tqdm is None: + self.reset() + self._tqdm.total=new_total + def clear(self): if self._tqdm is not None: self._tqdm.close() -- cgit v1.2.3