aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_samplers.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-01-04 23:56:43 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-01-04 23:56:43 +0300
commitbc43293c640aef65df3136de9e5bd8b7e79eb3e0 (patch)
treee30f03fe9ab658d44f3225b1d0ceb65c4e9e41f9 /modules/sd_samplers.py
parent81490780949fffed77493b4bd741e96ec737fe27 (diff)
fix incorrect display/calculation for number of steps for hires fix in progress bars
Diffstat (limited to 'modules/sd_samplers.py')
-rw-r--r--modules/sd_samplers.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py
index e904d860..3851a77f 100644
--- a/modules/sd_samplers.py
+++ b/modules/sd_samplers.py
@@ -97,8 +97,9 @@ sampler_extra_params = {
def setup_img2img_steps(p, steps=None):
if opts.img2img_fix_steps or steps is not None:
- steps = int((steps or p.steps) / min(p.denoising_strength, 0.999)) if p.denoising_strength > 0 else 0
- t_enc = p.steps - 1
+ requested_steps = (steps or p.steps)
+ steps = int(requested_steps / min(p.denoising_strength, 0.999)) if p.denoising_strength > 0 else 0
+ t_enc = requested_steps - 1
else:
steps = p.steps
t_enc = int(min(p.denoising_strength, 0.999) * steps)