mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-08-14 14:03:30 +08:00
- Add proper tensor reshaping in vae_sage_attention() wrapper - Convert VAE format (B, C, H, W) to SageAttention format (B, seq_len, dim) - Add fallback mechanism to pytorch attention if SageAttention fails - Enable SageAttention selection in vae_attention() function - Fixes ValueError: too many values to unpack (expected 3) error - Maintains compatibility with existing VAE attention functions This resolves the tensor shape incompatibility between VAE spatial attention and SageAttention sequence attention, allowing VAE operations to benefit from SageAttention optimization when --use-sage-attention flag is enabled.