Fabrice-TIERCELIN commited on
Commit
3f8059f
·
verified ·
1 Parent(s): 20d2752

LQ = HWC3(np.array(Image.open(input_image)))

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -86,7 +86,7 @@ def stage1_process(
86
  gr.Warning('Set this space to GPU config to make it work.')
87
  return None, None
88
  torch.cuda.set_device(SUPIR_device)
89
- LQ = HWC3(Image.open(input_image))
90
  LQ = fix_resize(LQ, 512)
91
  # stage1
92
  LQ = np.array(LQ) / 255 * 2 - 1
@@ -328,7 +328,7 @@ def restore(
328
  elif model_select == 'v0-F':
329
  model.load_state_dict(ckpt_F, strict=False)
330
  model.current_model = model_select
331
- input_image = HWC3(input_image)
332
  input_image = upscale_image(input_image, upscale, unit_resolution=32,
333
  min_size=min_size)
334
 
 
86
  gr.Warning('Set this space to GPU config to make it work.')
87
  return None, None
88
  torch.cuda.set_device(SUPIR_device)
89
+ LQ = HWC3(np.array(Image.open(input_image)))
90
  LQ = fix_resize(LQ, 512)
91
  # stage1
92
  LQ = np.array(LQ) / 255 * 2 - 1
 
328
  elif model_select == 'v0-F':
329
  model.load_state_dict(ckpt_F, strict=False)
330
  model.current_model = model_select
331
+ input_image = HWC3(np.array(input_image))
332
  input_image = upscale_image(input_image, upscale, unit_resolution=32,
333
  min_size=min_size)
334