JOY-Huang commited on
Commit
bfa03fb
1 Parent(s): c4c4126
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -158,6 +158,7 @@ def instantir_restore(
158
  preview_start = preview_start / steps
159
 
160
  lq, out_size = resize_img(lq, width=width, height=height)
 
161
  lq = [lq]
162
  generator = torch.Generator(device=device).manual_seed(seed)
163
  timesteps = [
@@ -182,9 +183,9 @@ def instantir_restore(
182
  return_dict=False,
183
  save_preview_row=True,
184
  )
185
- out[0][0] = out[0][0].resize(out_size[0], out_size[1], Image.BILINEAR)
186
  for i, preview_tuple in enumerate(out[1]):
187
- preview_tuple[0] = preview_tuple[0].resize(out_size[0], out_size[1], Image.BILINEAR)
188
  preview_tuple.append(f"preview_{i}")
189
  return out[0][0], out[1]
190
 
 
158
  preview_start = preview_start / steps
159
 
160
  lq, out_size = resize_img(lq, width=width, height=height)
161
+ print(out_size)
162
  lq = [lq]
163
  generator = torch.Generator(device=device).manual_seed(seed)
164
  timesteps = [
 
183
  return_dict=False,
184
  save_preview_row=True,
185
  )
186
+ out[0][0] = out[0][0].resize([out_size[0], out_size[1]], Image.BILINEAR)
187
  for i, preview_tuple in enumerate(out[1]):
188
+ preview_tuple[0] = preview_tuple[0].resize([out_size[0], out_size[1]], Image.BILINEAR)
189
  preview_tuple.append(f"preview_{i}")
190
  return out[0][0], out[1]
191