Brazela commited on
Commit
33cfd4f
·
verified ·
1 Parent(s): afbc889

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -37,7 +37,7 @@ async def upscale(
37
  pred = model(inputs)
38
 
39
  # pred is a tensor (1, 3, H, W) — convert to PIL manually
40
- sr = pred.squeeze(0).clamp(0, 1).cpu().numpy()
41
  sr = np.transpose(sr, (1, 2, 0))
42
  sr = (sr * 255).astype(np.uint8)
43
  result = Image.fromarray(sr)
 
37
  pred = model(inputs)
38
 
39
  # pred is a tensor (1, 3, H, W) — convert to PIL manually
40
+ sr = pred.squeeze(0).clamp(0, 1).detach().cpu().numpy()
41
  sr = np.transpose(sr, (1, 2, 0))
42
  sr = (sr * 255).astype(np.uint8)
43
  result = Image.fromarray(sr)