From ba50d368c33b925721cc09e551bef039352a7ed4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 19 Sep 2025 23:51:58 +0300 Subject: [PATCH] Enable pytorch attention in VAE for AMD RDNA 4 --- comfy/model_management.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comfy/model_management.py b/comfy/model_management.py index bbfc3c7a1..b1e866c0d 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -348,7 +348,7 @@ try: # if any((a in arch) for a in ["gfx1201"]): # ENABLE_PYTORCH_ATTENTION = True if torch_version_numeric >= (2, 7) and rocm_version >= (6, 4): - if any((a in arch) for a in ["gfx1201", "gfx942", "gfx950"]): # TODO: more arches + if any((a in arch) for a in ["gfx1200", "gfx1201", "gfx942", "gfx950"]): # TODO: more arches SUPPORT_FP8_OPS = True except: @@ -1112,7 +1112,7 @@ def pytorch_attention_enabled(): return ENABLE_PYTORCH_ATTENTION def pytorch_attention_enabled_vae(): - if is_amd(): + if is_amd() and not amd_min_version(device=None, min_rdna_version=4): return False # enabling pytorch attention on AMD currently causes crash when doing high res return pytorch_attention_enabled()