a7bedb33ee973849b0b5d549864702967128c5d6
Previous xformers.py fix only covered our attention backend. The crash moved to qwen2_vl.py's Qwen2VisionAttention.forward (base image file) which directly calls xops.memory_efficient_attention_forward during profiling's _process_image_input → visual() → block.attn(). Fix: monkey-patch Qwen2VisionAttention.forward at import time to use the same PyTorch F.scaled_dot_product_attention path that qwen2_vl.py already has for CPU (is_cpu() branch). This is the exact same math, just without xops dispatch to ixformer's broken varlen_fwd. Also added try/except fallback in _process_image_input for safety.
project_6
Description
Languages
C++
41.8%
Cuda
31.6%
Python
22.2%
C
2.1%
CMake
1.1%
Other
1.1%