aboutsummaryrefslogtreecommitdiff
path: root/scripts/xy_grid.py
diff options
context:
space:
mode:
authorDepFA <35278260+dfaker@users.noreply.github.com>2022-09-26 14:46:18 +0100
committerAUTOMATIC1111 <16777216c@gmail.com>2022-09-27 09:06:44 +0300
commit175baaaca23d3e58bbeaef183b1ee3e6344badec (patch)
tree0af071ad257b29f18d485a8d81d66133e9f0bdb7 /scripts/xy_grid.py
parentc0b1177a3203091ca43f2d08f24dd821f1237612 (diff)
xy_grid - Show blank cells when grid is incomplete
Diffstat (limited to 'scripts/xy_grid.py')
-rw-r--r--scripts/xy_grid.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/xy_grid.py b/scripts/xy_grid.py
index 3a2e103f..279af6b7 100644
--- a/scripts/xy_grid.py
+++ b/scripts/xy_grid.py
@@ -2,6 +2,7 @@ from collections import namedtuple
from copy import copy
import random
+from PIL import Image
import numpy as np
import modules.scripts as scripts
@@ -108,7 +109,10 @@ def draw_xy_grid(p, xs, ys, x_labels, y_labels, cell, draw_legend):
if first_pocessed is None:
first_pocessed = processed
- res.append(processed.images[0])
+ try:
+ res.append(processed.images[0])
+ except:
+ res.append(Image.new(res[0].mode, res[0].size))
grid = images.image_grid(res, rows=len(ys))
if draw_legend: