add half() supporrt for CLIP interrogation

This commit is contained in:
AUTOMATIC
2022-09-11 23:24:24 +03:00
parent d97c6f221f
commit 8fb9c57ed6
6 changed files with 40 additions and 30 deletions

View File

@@ -14,3 +14,9 @@ def get_optimal_device():
return torch.device("mps")
return cpu
def torch_gc():
if torch.cuda.is_available():
torch.cuda.empty_cache()
torch.cuda.ipc_collect()