diff options
author | 不会画画的中医不是好程序员 <yfszzx@gmail.com> | 2022-10-16 02:04:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-16 02:04:05 +0000 |
commit | d41ac174e24e1e7cdcf7b42f2a03cbc6394eb5e5 (patch) | |
tree | da39175c109598f17e89fafe57aac9b9597ff616 /scripts/xy_grid.py | |
parent | 6e4f5566b58e36aede83427df6c69eba8517af28 (diff) | |
parent | be1596ce30b1ead6998da0c62003003dcce5eb2c (diff) | |
download | stable-diffusion-webui-gfx803-d41ac174e24e1e7cdcf7b42f2a03cbc6394eb5e5.tar.gz stable-diffusion-webui-gfx803-d41ac174e24e1e7cdcf7b42f2a03cbc6394eb5e5.tar.bz2 stable-diffusion-webui-gfx803-d41ac174e24e1e7cdcf7b42f2a03cbc6394eb5e5.zip |
Merge branch 'AUTOMATIC1111:master' into master
Diffstat (limited to 'scripts/xy_grid.py')
-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)
|