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