From 0d7b0a4dc7e847b08a9c4b9262f7f64a6d2040b2 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Sun, 20 Aug 2023 14:56:47 -0400 Subject: [PATCH] Small cleanups. --- comfy/model_management.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/comfy/model_management.py b/comfy/model_management.py index 51f6314..fc0cb90 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -589,7 +589,10 @@ def should_use_fp16(device=None, model_params=0): if cpu_mode() or mps_mode(): return False #TODO ? - if torch.cuda.is_bf16_supported() or xpu_available: + if xpu_available: + return True + + if torch.cuda.is_bf16_supported(): return True props = torch.cuda.get_device_properties("cuda")