aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorw-e-w <40751091+w-e-w@users.noreply.github.com>2023-09-16 09:49:53 +0900
committerw-e-w <40751091+w-e-w@users.noreply.github.com>2023-09-16 09:54:14 +0900
commitd2878a8b0b952c08d832e0308e575e352a1bc3f1 (patch)
treeb932b865e78a2a4708508ca44b6ec88fbd9971ab /scripts
parent102b6617dacffdcc89c56badcaae6c5e83c3ff21 (diff)
XYZ if not Include Sub Grids do not save Sub Grid
Diffstat (limited to 'scripts')
-rw-r--r--scripts/xyz_grid.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py
index 939d8605..99ad96be 100644
--- a/scripts/xyz_grid.py
+++ b/scripts/xyz_grid.py
@@ -773,6 +773,8 @@ class Script(scripts.Script):
# TODO: See previous comment about intentional data misalignment.
adj_g = g-1 if g > 0 else g
images.save_image(processed.images[g], p.outpath_grids, "xyz_grid", info=processed.infotexts[g], extension=opts.grid_format, prompt=processed.all_prompts[adj_g], seed=processed.all_seeds[adj_g], grid=True, p=processed)
+ if not include_sub_grids: # if not include_sub_grids then skip saving after the first grid
+ break
if not include_sub_grids:
# Done with sub-grids, drop all related information: