Implement comfy kitchen attention. (#15479)

Add a ModelAttentionBackend node to manually select the attention for models in the workflows. Currently supports pytorch attention or comfy kitchen attention.

Add --use-ck-attention to enable comfy kitchen attention as the default attention backend for all models (might break some).
This commit is contained in:
comfyanonymous
2026-08-10 22:03:08 -07:00
committed by GitHub
parent 4f3544d131
commit bf4c9a08fc
7 changed files with 162 additions and 6 deletions

View File

@@ -1658,6 +1658,9 @@ def unpin_memory(tensor):
def sage_attention_enabled():
return args.use_sage_attention
def comfy_kitchen_attention_enabled():
return args.use_ck_attention
def flash_attention_enabled():
return args.use_flash_attention