From 748bdbf437246a3ca6671196e333f336fe72bf61 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Tue, 8 Apr 2025 00:15:57 +0300 Subject: [PATCH] Update rocm flash attention repo with navi rotary fix --- modules/rocm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/rocm.py b/modules/rocm.py index a742556a2..f16809291 100644 --- a/modules/rocm.py +++ b/modules/rocm.py @@ -204,7 +204,9 @@ else: def get_flash_attention_command(agent: Agent): default = "git+https://github.com/ROCm/flash-attention" if agent.gfx_version >= 0x1100 and os.environ.get("FLASH_ATTENTION_USE_TRITON_ROCM", "false").lower() != "true": - default = "git+https://github.com/ROCm/flash-attention@howiejay/navi_support" + # use the navi_rotary_fix fork because the original doesn't support rotary_emb for transformers + # original: "git+https://github.com/ROCm/flash-attention@howiejay/navi_support" + default = "https://github.com/Disty0/flash-attention@navi_rotary_fix" return os.environ.get("FLASH_ATTENTION_PACKAGE", default) is_wsl: bool = os.environ.get('WSL_DISTRO_NAME', 'unknown' if spawn('wslpath -w /') else None) is not None