Update launch.py

pull/1699/head
Nripesh Niketan 2023-07-25 08:47:05 +05:30 committed by GitHub
parent a0a220d84b
commit 4e06dad9f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 5 deletions

View File

@ -59,11 +59,6 @@ class InferencerCache:
if len(cls._cache) == cls.max_size:
cls._cache.pop(cls.max_size - 1)
torch.cuda.empty_cache()
try:
import torch.mps
torch.mps.empty_cache()
except ImportError:
pass
device = get_free_device()
instance = callback(device=device)
logger.info(f'New instance {instance_name} on {device}.')