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
This commit is contained in:
RnDMonkey
2022-09-23 22:09:59 -07:00
committed by GitHub
parent 7aec029423
commit ed8b8b3b8c
3 changed files with 36 additions and 5 deletions

View File

@@ -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:

View File

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