From 5d8bbb72816c263df1cff53c3c4a7835eeecc636 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Fri, 23 Aug 2024 04:06:27 -0400 Subject: [PATCH] Cleanup. --- comfy/model_management.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/comfy/model_management.py b/comfy/model_management.py index fd39790..91e692b 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -47,8 +47,7 @@ total_vram = 0 xpu_available = False 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) - xpu_available = xpu_available and torch.xpu.is_available() + 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