From a6ef08a46a38063a0be46053b9ec39e9411f632e Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Wed, 23 Aug 2023 21:38:28 -0400 Subject: [PATCH] Even with forced fp16 the cpu device should never use it. --- comfy/model_management.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/comfy/model_management.py b/comfy/model_management.py index 9c100144..83053ea4 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -573,11 +573,15 @@ def should_use_fp16(device=None, model_params=0): global xpu_available global directml_enabled + if device is not None: + if is_device_cpu(device): + return False + if FORCE_FP16: return True if device is not None: #TODO - if is_device_cpu(device) or is_device_mps(device): + if is_device_mps(device): return False if FORCE_FP32: