aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/xy_grid.py
diff options
context:
space:
mode:
authorNick Renieris <velocityra@gmail.com>2022-09-29 18:16:12 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2022-09-29 18:18:29 +0000
commit498515e7a19bb3e8ab36aab2e628eb6be7464401 (patch)
tree9f2619d24f2ca10e2d4ed6ec43cf384f1e7b2cc1 /scripts/xy_grid.py
parenta112168d2814d691936a7fb1d4cde5acb8440679 (diff)
downloadstable-diffusion-webui-gfx803-498515e7a19bb3e8ab36aab2e628eb6be7464401.tar.gz
stable-diffusion-webui-gfx803-498515e7a19bb3e8ab36aab2e628eb6be7464401.tar.bz2
stable-diffusion-webui-gfx803-498515e7a19bb3e8ab36aab2e628eb6be7464401.zip
scripts/xy_grid: Handle edge-case with non-empty axis values
Fixes bug where if Type is Nothing and axis values are filled out (from ie. previously using another Type), it will still needlessly run it N times (with identical results).
Diffstat (limited to 'scripts/xy_grid.py')
-rw-r--r--scripts/xy_grid.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/xy_grid.py b/scripts/xy_grid.py
index 24fa5a0a..f8bc64c4 100644
--- a/scripts/xy_grid.py
+++ b/scripts/xy_grid.py
@@ -159,6 +159,9 @@ class Script(scripts.Script):
p.batch_size = 1
def process_axis(opt, vals):
+ if opt.label == 'Nothing':
+ return [0]
+
valslist = [x.strip() for x in vals.split(",")]
if opt.type == int: