Gate CUDA-only attention on ROCm

This commit is contained in:
野生の男 2026-08-12 15:02:14 +09:00
parent 1108f2ac5e
commit 9d60a690c2
1 changed files with 3 additions and 1 deletions

View File

@ -51,7 +51,9 @@ except ImportError:
logging.error(f"\n\nTo use the `--use-flash-attention` feature, the `flash-attn` package must be installed first.\ncommand:\n\t{sys.executable} -m pip install flash-attn")
exit(-1)
COMFY_KITCHEN_INT8_ATTENTION_IS_AVAILABLE = comfy_kitchen.int8_attention_is_available()
COMFY_KITCHEN_INT8_ATTENTION_IS_AVAILABLE = (
torch.version.hip is None and comfy_kitchen.int8_attention_is_available()
)
REGISTERED_ATTENTION_FUNCTIONS = {}
def register_attention_function(name: str, func: Callable):