diff options
author | brkirch <brkirch@users.noreply.github.com> | 2023-01-05 04:10:31 +0000 |
---|---|---|
committer | brkirch <brkirch@users.noreply.github.com> | 2023-01-06 05:15:22 +0000 |
commit | 3bfe2bb5498241c4873cdd71b3f0a5bac5f64d7f (patch) | |
tree | c296183ec50286cf3552add8c1c967c2f843ec47 /modules/sd_samplers.py | |
parent | f6ab5a39d762a7791573d1c52ae5a3024b10e8ed (diff) | |
parent | 5f4fa942b8ec3ed3b15a352903489d6f9e6eb46e (diff) | |
download | stable-diffusion-webui-gfx803-3bfe2bb5498241c4873cdd71b3f0a5bac5f64d7f.tar.gz stable-diffusion-webui-gfx803-3bfe2bb5498241c4873cdd71b3f0a5bac5f64d7f.tar.bz2 stable-diffusion-webui-gfx803-3bfe2bb5498241c4873cdd71b3f0a5bac5f64d7f.zip |
Merge remote-tracking branch 'upstream/master' into sub-quad_attn_opt
Diffstat (limited to 'modules/sd_samplers.py')
-rw-r--r-- | modules/sd_samplers.py | 5 |
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)
|