aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorw-e-w <40751091+w-e-w@users.noreply.github.com>2023-12-21 15:08:35 +0000
committerw-e-w <40751091+w-e-w@users.noreply.github.com>2023-12-21 15:37:30 +0000
commitde1809bd14450cfc41623b6021c7087fb385ab6f (patch)
tree3f9cbeb60088a33066dccd055994e95b6c6f71b8 /scripts
parentde03882d6ca56bc81058f5120f028678a6a54aaa (diff)
downloadstable-diffusion-webui-gfx803-de1809bd14450cfc41623b6021c7087fb385ab6f.tar.gz
stable-diffusion-webui-gfx803-de1809bd14450cfc41623b6021c7087fb385ab6f.tar.bz2
stable-diffusion-webui-gfx803-de1809bd14450cfc41623b6021c7087fb385ab6f.zip
handle axis_type is None
Diffstat (limited to 'scripts')
-rw-r--r--scripts/xyz_grid.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py
index b2250c04..e5083874 100644
--- a/scripts/xyz_grid.py
+++ b/scripts/xyz_grid.py
@@ -476,6 +476,8 @@ class Script(scripts.Script):
fill_z_button.click(fn=fill, inputs=[z_type, csv_mode], outputs=[z_values, z_values_dropdown])
def select_axis(axis_type, axis_values, axis_values_dropdown, csv_mode):
+ axis_type = axis_type or 0 # if axle type is None set to 0
+
choices = self.current_axis_options[axis_type].choices
has_choices = choices is not None
@@ -526,6 +528,8 @@ class Script(scripts.Script):
return [x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_fixed_seeds, margin_size, csv_mode]
def run(self, p, x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_fixed_seeds, margin_size, csv_mode):
+ x_type, y_type, z_type = x_type or 0, y_type or 0, z_type or 0 # if axle type is None set to 0
+
if not no_fixed_seeds:
modules.processing.fix_seed(p)