ComfyUI/comfy/ldm
Scott Yewell 55760cdeb5 attention_pytorch: skip the chunk buffer/copy when steps==1
Addresses CodeRabbit feedback on #14838: the chunking loop always
allocated a temporary output buffer and copied SDPA's result into it,
even in the common case (any non-MPS device, or MPS below the size
threshold) where steps==1 and the loop only ever runs once. Adds a
fast path that calls scaled_dot_product_attention directly and
reshapes its result, matching the original pre-fix code for that case
-- no extra allocation or copy. The chunked path (steps>1) is
unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HAMqHgFBD6e9wjU8k8U6uW
2026-07-08 16:31:12 -04:00
..
ace Support gqa on all attention backends, drop support for pytorch 2.4 (#14772) 2026-07-07 22:57:52 -04:00
anima
audio
aura
boogu
cascade
chroma
chroma_radiance
cogvideo
cosmos
depth_anything_3
ernie
flux Remove old useless no comfy kitchen fallback. (#14245) 2026-06-02 17:52:41 -07:00
genmo
hidream Enable Runtime Selection of Attention Functions (#9639) 2025-09-12 18:07:38 -04:00
hidream_o1
hunyuan3d
hunyuan3dv2_1
hunyuan_video
hydit
ideogram4
kandinsky5
krea2
lens
lightricks
lumina
mmaudio/vae
models
modules attention_pytorch: skip the chunk buffer/copy when steps==1 2026-07-08 16:31:12 -04:00
moge
omnigen
pixart
pixeldit
qwen_image
rt_detr
sam3 Improve SAM3 large input handling (#13767) 2026-05-07 17:18:28 -07:00
supir
triposplat
wan feat: SCAIL-2 multireference (CORE-310) (#14509) 2026-06-17 16:21:23 +03:00
colormap.py
common_dit.py
util.py