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

@@ -149,6 +149,7 @@ attn_group.add_argument("--use-quad-cross-attention", action="store_true", help=
attn_group.add_argument("--use-pytorch-cross-attention", action="store_true", help="Use the new pytorch 2.0 cross attention function.")
attn_group.add_argument("--use-sage-attention", action="store_true", help="Use sage attention.")
attn_group.add_argument("--use-flash-attention", action="store_true", help="Use FlashAttention.")
attn_group.add_argument("--use-ck-attention", action="store_true", help="Use Comfy Kitchen attention.")
parser.add_argument("--disable-xformers", action="store_true", help="Disable xformers.")