From 3e226f02f36687d6977d4be313be243305ad06ab Mon Sep 17 00:00:00 2001 From: patientx Date: Fri, 30 Aug 2024 20:08:18 +0300 Subject: [PATCH] Update model_management.py --- comfy/model_management.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/comfy/model_management.py b/comfy/model_management.py index 6b031e204..19e57a79d 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -45,11 +45,12 @@ cpu_state = CPUState.GPU total_vram = 0 xpu_available = False #We don't have xpu with zluda , so disabling all together. -# try: -# torch_version = torch.version.__version__ -# xpu_available = (int(torch_version[0]) < 2 or (int(torch_version[0]) == 2 and int(torch_version[2]) <= 4)) and torch.xpu.is_available() -# except: -# pass +torch_version = "" + try: + torch_version = torch.version.__version__ + xpu_available = (int(torch_version[0]) < 2 or (int(torch_version[0]) == 2 and int(torch_version[2]) <= 4)) and torch.xpu.is_available() + except: + pass lowvram_available = True if args.deterministic: