Spaces:
Running
Running
fix typo
Browse files- app/inference.py +2 -1
app/inference.py
CHANGED
|
@@ -23,7 +23,8 @@ def clear_cache():
|
|
| 23 |
if torch.cuda.is_available():
|
| 24 |
torch.cuda.empty_cache()
|
| 25 |
torch.cuda.ipc_collect()
|
| 26 |
-
torch.mps.
|
|
|
|
| 27 |
|
| 28 |
|
| 29 |
def load_model(model_id, device=DEVICE):
|
|
|
|
| 23 |
if torch.cuda.is_available():
|
| 24 |
torch.cuda.empty_cache()
|
| 25 |
torch.cuda.ipc_collect()
|
| 26 |
+
if torch.backends.mps.is_available():
|
| 27 |
+
torch.mps.empty_cache()
|
| 28 |
|
| 29 |
|
| 30 |
def load_model(model_id, device=DEVICE):
|