From 2785af1bc4bff2041d09f5cd9ff7877709c75761 Mon Sep 17 00:00:00 2001 From: Seunghoon Lee Date: Sun, 18 Feb 2024 01:23:25 +0900 Subject: [PATCH] zluda enable math sdp kernel --- modules/zluda.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/zluda.py b/modules/zluda.py index e2d7d15bb..37e946825 100644 --- a/modules/zluda.py +++ b/modules/zluda.py @@ -9,5 +9,6 @@ def initialize_zluda(): torch.backends.cudnn.enabled = shared.opts.zluda_enable_cudnn if torch.backends.cudnn.enabled: shared.log.warning("cuDNN with ZLUDA won't work at this moment. Please wait for future update.") - if shared.opts.cross_attention_optimization == "Scaled-Dot-Product": - shared.log.warning("ZLUDA does not support Scaled-Dot-Product attention. Please consider changing it to Batch matrix-matrix.") + torch.backends.cuda.enable_flash_sdp(False) + torch.backends.cuda.enable_math_sdp(True) + torch.backends.cuda.enable_mem_efficient_sdp(False)