diff options
author | Nick Renieris <velocityra@gmail.com> | 2022-09-29 18:16:12 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-09-29 18:18:29 +0000 |
commit | 498515e7a19bb3e8ab36aab2e628eb6be7464401 (patch) | |
tree | 9f2619d24f2ca10e2d4ed6ec43cf384f1e7b2cc1 /scripts/xy_grid.py | |
parent | a112168d2814d691936a7fb1d4cde5acb8440679 (diff) | |
download | stable-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.py | 3 |
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:
|