aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-17 11:55:40 +0000
committerAUTOMATIC <16777216c@gmail.com>2022-09-17 11:55:40 +0000
commit140f89315380dbcc541f6e18e3d355a06ea3e2f0 (patch)
tree43a92d8a7bf4368e2b9ec9107b57edd061c27303 /scripts
parent304222ef94d1c3c60fab466a96c448868f391bce (diff)
downloadstable-diffusion-webui-gfx803-140f89315380dbcc541f6e18e3d355a06ea3e2f0.tar.gz
stable-diffusion-webui-gfx803-140f89315380dbcc541f6e18e3d355a06ea3e2f0.tar.bz2
stable-diffusion-webui-gfx803-140f89315380dbcc541f6e18e3d355a06ea3e2f0.zip
process all values for x/y plot right away to error out if any are bad before any processing begins
Diffstat (limited to 'scripts')
-rw-r--r--scripts/xy_grid.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/xy_grid.py b/scripts/xy_grid.py
index 680dd702..6a157722 100644
--- a/scripts/xy_grid.py
+++ b/scripts/xy_grid.py
@@ -90,11 +90,11 @@ axis_options = [
]
-def draw_xy_grid(p, xs, ys, x_label, y_label, cell, draw_legend):
+def draw_xy_grid(p, xs, ys, x_labels, y_labels, cell, draw_legend):
res = []
- ver_texts = [[images.GridAnnotation(y_label(y))] for y in ys]
- hor_texts = [[images.GridAnnotation(x_label(x))] for x in xs]
+ ver_texts = [[images.GridAnnotation(y)] for y in y_labels]
+ hor_texts = [[images.GridAnnotation(x)] for x in x_labels]
first_pocessed = None
@@ -218,8 +218,8 @@ class Script(scripts.Script):
p,
xs=xs,
ys=ys,
- x_label=lambda x: x_opt.format_value(p, x_opt, x),
- y_label=lambda y: y_opt.format_value(p, y_opt, y),
+ x_labels=[x_opt.format_value(p, x_opt, x) for x in xs],
+ y_labels=[y_opt.format_value(p, y_opt, y) for y in ys],
cell=cell,
draw_legend=draw_legend
)