diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-15 07:20:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 07:20:29 +0000 |
commit | 956363648989694cb4a2fb399b90af1b7b15b45c (patch) | |
tree | c2e011a81ba9cd904453469c422bcc63710fd77e | |
parent | 5207cba56f4f9c9a86c8ac40dc21bdf100b82625 (diff) | |
parent | a8f7722e4e7460122b44589c3718eee0c597009d (diff) | |
download | stable-diffusion-webui-gfx803-956363648989694cb4a2fb399b90af1b7b15b45c.tar.gz stable-diffusion-webui-gfx803-956363648989694cb4a2fb399b90af1b7b15b45c.tar.bz2 stable-diffusion-webui-gfx803-956363648989694cb4a2fb399b90af1b7b15b45c.zip |
Merge pull request #2663 from space-nuko/fix-xyplot-steps
Fix XY-plot steps if highres fix is enabled
-rw-r--r-- | scripts/xy_grid.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/xy_grid.py b/scripts/xy_grid.py index 8c7da6bb..88ad3bf7 100644 --- a/scripts/xy_grid.py +++ b/scripts/xy_grid.py @@ -12,7 +12,7 @@ import gradio as gr from modules import images
from modules.hypernetworks import hypernetwork
-from modules.processing import process_images, Processed, get_correct_sampler
+from modules.processing import process_images, Processed, get_correct_sampler, StableDiffusionProcessingTxt2Img
from modules.shared import opts, cmd_opts, state
import modules.shared as shared
import modules.sd_samplers
@@ -354,6 +354,9 @@ class Script(scripts.Script): else:
total_steps = p.steps * len(xs) * len(ys)
+ if isinstance(p, StableDiffusionProcessingTxt2Img) and p.enable_hr:
+ total_steps *= 2
+
print(f"X/Y plot will create {len(xs) * len(ys) * p.n_iter} images on a {len(xs)}x{len(ys)} grid. (Total steps to process: {total_steps * p.n_iter})")
shared.total_tqdm.updateTotal(total_steps * p.n_iter)
|