Commit 175baaac authored by DepFA's avatar DepFA Committed by AUTOMATIC1111

xy_grid - Show blank cells when grid is incomplete

parent c0b1177a
...@@ -2,6 +2,7 @@ from collections import namedtuple ...@@ -2,6 +2,7 @@ from collections import namedtuple
from copy import copy from copy import copy
import random import random
from PIL import Image
import numpy as np import numpy as np
import modules.scripts as scripts import modules.scripts as scripts
...@@ -108,7 +109,10 @@ def draw_xy_grid(p, xs, ys, x_labels, y_labels, cell, draw_legend): ...@@ -108,7 +109,10 @@ def draw_xy_grid(p, xs, ys, x_labels, y_labels, cell, draw_legend):
if first_pocessed is None: if first_pocessed is None:
first_pocessed = processed 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)) grid = images.image_grid(res, rows=len(ys))
if draw_legend: if draw_legend:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment