aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sd_samplers.py
diff options
context:
space:
mode:
authorJohannesGaessler <johannesg@5d6.de>2022-09-08 13:37:13 +0000
committerJohannesGaessler <johannesg@5d6.de>2022-09-08 15:05:17 +0000
commitf211c498b9d496222aa36360193e0f690053dfa4 (patch)
treef215cb60083359e2679f8e38244d005cccf64725 /modules/sd_samplers.py
parentad02b249f5bf8e494c35a313f44515b7b1e6739d (diff)
downloadstable-diffusion-webui-gfx803-f211c498b9d496222aa36360193e0f690053dfa4.tar.gz
stable-diffusion-webui-gfx803-f211c498b9d496222aa36360193e0f690053dfa4.tar.bz2
stable-diffusion-webui-gfx803-f211c498b9d496222aa36360193e0f690053dfa4.zip
More informative progress printing
Diffstat (limited to 'modules/sd_samplers.py')
-rw-r--r--modules/sd_samplers.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py
index 140b5dea..23022206 100644
--- a/modules/sd_samplers.py
+++ b/modules/sd_samplers.py
@@ -70,13 +70,14 @@ def extended_tdqm(sequence, *args, desc=None, **kwargs):
state.sampling_steps = len(sequence)
state.sampling_step = 0
- for x in tqdm.tqdm(sequence, *args, desc=state.job, **kwargs):
+ for x in tqdm.tqdm(sequence, *args, desc=state.job, file=shared.progress_print_out, **kwargs):
if state.interrupted:
break
yield x
state.sampling_step += 1
+ shared.total_tqdm.update()
ldm.models.diffusion.ddim.tqdm = lambda *args, desc=None, **kwargs: extended_tdqm(*args, desc=desc, **kwargs)
@@ -146,13 +147,14 @@ def extended_trange(count, *args, **kwargs):
state.sampling_steps = count
state.sampling_step = 0
- for x in tqdm.trange(count, *args, desc=state.job, **kwargs):
+ for x in tqdm.trange(count, *args, desc=state.job, file=shared.progress_print_out, **kwargs):
if state.interrupted:
break
yield x
state.sampling_step += 1
+ shared.total_tqdm.update()
class KDiffusionSampler: