xiongjie commited on
Commit
9cf1cd2
1 Parent(s): 7444ba5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -18,6 +18,7 @@ class SimpleRealUpscaler:
18
  model.eval()
19
  self.model = model.to(self.device)
20
 
 
21
  def upscale(self, np_image_rgb):
22
  image_rgb_tensor = torch.tensor(np_image_rgb[:,:,::-1].astype(np.float32)).to(self.device)
23
  image_rgb_tensor /= 255
 
18
  model.eval()
19
  self.model = model.to(self.device)
20
 
21
+ @torch.no_grad()
22
  def upscale(self, np_image_rgb):
23
  image_rgb_tensor = torch.tensor(np_image_rgb[:,:,::-1].astype(np.float32)).to(self.device)
24
  image_rgb_tensor /= 255