diff options
author | JohannesGaessler <johannesg@5d6.de> | 2022-09-08 13:37:13 +0000 |
---|---|---|
committer | JohannesGaessler <johannesg@5d6.de> | 2022-09-08 15:05:17 +0000 |
commit | f211c498b9d496222aa36360193e0f690053dfa4 (patch) | |
tree | f215cb60083359e2679f8e38244d005cccf64725 /modules/sd_samplers.py | |
parent | ad02b249f5bf8e494c35a313f44515b7b1e6739d (diff) | |
download | stable-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.py | 6 |
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:
|