From 491ba204fbc0be59b2ef624f54437cc873bb19c1 Mon Sep 17 00:00:00 2001 From: GiusTex <112352961+GiusTex@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:48:42 +0200 Subject: [PATCH] Removed ipc_collect from not supported devices --- utils.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/utils.py b/utils.py index c5e7f3a..4346724 100644 --- a/utils.py +++ b/utils.py @@ -84,18 +84,14 @@ def clearVram(device): torch.cuda.ipc_collect() elif device.type == "mps": torch.mps.empty_cache() - torch.mps.ipc_collect() elif device.type == "xla": torch.xla.empty_cache() - torch.xla.ipc_collect() elif device.type == "xpu": torch.xpu.empty_cache() - torch.xpu.ipc_collect() elif device.type == "meta": torch.meta.empty_cache() - torch.meta.ipc_collect() - else: # for CPU - torch.ipc_collect() + + # torch.ipc_collect() not available, and ipc_collect seems available only for cuda def encodeDiffOutpaintPrompt(model_path, dtype, final_prompt, device):