diff --git a/comfy/model_management.py b/comfy/model_management.py index 816caf18fb5..00ca26ecd21 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -317,7 +317,7 @@ def is_amd(): pass -if ENABLE_PYTORCH_ATTENTION: +if ENABLE_PYTORCH_ATTENTION and cpu_state != CPUState.CPU: torch.backends.cuda.enable_math_sdp(True) torch.backends.cuda.enable_flash_sdp(True) torch.backends.cuda.enable_mem_efficient_sdp(True)