Spaces:
Running
Running
commit
Browse files
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
|