Update launch.py
parent
a0a220d84b
commit
4e06dad9f6
|
@ -59,11 +59,6 @@ class InferencerCache:
|
||||||
if len(cls._cache) == cls.max_size:
|
if len(cls._cache) == cls.max_size:
|
||||||
cls._cache.pop(cls.max_size - 1)
|
cls._cache.pop(cls.max_size - 1)
|
||||||
torch.cuda.empty_cache()
|
torch.cuda.empty_cache()
|
||||||
try:
|
|
||||||
import torch.mps
|
|
||||||
torch.mps.empty_cache()
|
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
device = get_free_device()
|
device = get_free_device()
|
||||||
instance = callback(device=device)
|
instance = callback(device=device)
|
||||||
logger.info(f'New instance {instance_name} on {device}.')
|
logger.info(f'New instance {instance_name} on {device}.')
|
||||||
|
|
Loading…
Reference in New Issue