hysts HF staff commited on
Commit
b6c80e7
1 Parent(s): 7d37aeb
Files changed (1) hide show
  1. model.py +2 -2
model.py CHANGED
@@ -123,8 +123,8 @@ class Model:
123
  d = nrows * ncols - len(images)
124
  if d > 0:
125
  images += [np.full((h, w, 3), 255, dtype=np.uint8)] * d
126
- grid = np.asarray(images).reshape(2, 2, h, w, 3).transpose(
127
- 0, 2, 1, 3, 4).reshape(2 * h, 2 * w, 3)
128
  return PIL.Image.fromarray(grid)
129
 
130
  def run_simple(self) -> PIL.Image.Image:
 
123
  d = nrows * ncols - len(images)
124
  if d > 0:
125
  images += [np.full((h, w, 3), 255, dtype=np.uint8)] * d
126
+ grid = np.asarray(images).reshape(nrows, ncols, h, w, 3).transpose(
127
+ 0, 2, 1, 3, 4).reshape(nrows * h, ncols * w, 3)
128
  return PIL.Image.fromarray(grid)
129
 
130
  def run_simple(self) -> PIL.Image.Image: