diff options
author | DepFA <35278260+dfaker@users.noreply.github.com> | 2022-09-26 13:46:18 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-09-27 06:06:44 +0000 |
commit | 175baaaca23d3e58bbeaef183b1ee3e6344badec (patch) | |
tree | 0af071ad257b29f18d485a8d81d66133e9f0bdb7 /scripts/xy_grid.py | |
parent | c0b1177a3203091ca43f2d08f24dd821f1237612 (diff) | |
download | stable-diffusion-webui-gfx803-175baaaca23d3e58bbeaef183b1ee3e6344badec.tar.gz stable-diffusion-webui-gfx803-175baaaca23d3e58bbeaef183b1ee3e6344badec.tar.bz2 stable-diffusion-webui-gfx803-175baaaca23d3e58bbeaef183b1ee3e6344badec.zip |
xy_grid - Show blank cells when grid is incomplete
Diffstat (limited to 'scripts/xy_grid.py')
-rw-r--r-- | scripts/xy_grid.py | 6 |
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:
|