From 321c5fa2958a2cdb05a08f6792fd2f72336e8c90 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Sun, 17 Sep 2023 04:09:19 -0400 Subject: [PATCH] Enable pytorch attention by default on xpu. --- comfy/model_management.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/comfy/model_management.py b/comfy/model_management.py index e38ef4ee..d8bc3bfe 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -165,6 +165,9 @@ try: ENABLE_PYTORCH_ATTENTION = True if torch.cuda.is_bf16_supported(): VAE_DTYPE = torch.bfloat16 + if is_intel_xpu(): + if args.use_split_cross_attention == False and args.use_quad_cross_attention == False: + ENABLE_PYTORCH_ATTENTION = True except: pass