yaron123 commited on
Commit
b8266b6
·
1 Parent(s): c9d72ad
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -409,11 +409,9 @@ CHECKPOINTS = ESRGANUpscalerCheckpoints(
409
  )
410
 
411
  # initialize the enhancer, on the cpu
412
- DEVICE_CPU = torch.device("cpu")
413
- DTYPE = torch.bfloat16 if torch.cuda.is_bf16_supported() else torch.float32
414
- enhancer = ESRGANUpscaler(checkpoints=CHECKPOINTS, device=DEVICE_CPU, dtype=DTYPE)
415
-
416
  device = DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
 
 
417
  enhancer.to(device=DEVICE, dtype=DTYPE)
418
 
419
  # logging
 
409
  )
410
 
411
  # initialize the enhancer, on the cpu
 
 
 
 
412
  device = DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
413
+ DTYPE = torch.bfloat16 if torch.cuda.is_bf16_supported() else torch.float32
414
+ enhancer = ESRGANUpscaler(checkpoints=CHECKPOINTS, device=DEVICE, dtype=DTYPE)
415
  enhancer.to(device=DEVICE, dtype=DTYPE)
416
 
417
  # logging