esun-choi commited on
Commit
6d6ace0
·
1 Parent(s): 088dab0

Update sr/sr.py

Browse files
Files changed (1) hide show
  1. sr/sr.py +2 -2
sr/sr.py CHANGED
@@ -3,8 +3,8 @@ from PIL import Image
3
  import numpy as np
4
  from .esrgan.RealESRGAN import RealESRGAN
5
  def sr(img):
6
- # device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
7
- device=torch.device("cuda")
8
  model = RealESRGAN(device, scale=2)
9
  model.load_weights('weights/RealESRGAN_x2.pth', download=True)
10
 
 
3
  import numpy as np
4
  from .esrgan.RealESRGAN import RealESRGAN
5
  def sr(img):
6
+ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
7
+ # device=torch.device("cuda")
8
  model = RealESRGAN(device, scale=2)
9
  model.load_weights('weights/RealESRGAN_x2.pth', download=True)
10