[Bugfix] fix the ima issue of qwen-vit (#32687)

Signed-off-by: JJJYmmm <92386084+JJJYmmm@users.noreply.github.com>
This commit is contained in:
JJJYmmm
2026-01-21 01:21:25 +08:00
committed by GitHub
parent c025263ddd
commit 04a9e064db
2 changed files with 3 additions and 2 deletions

View File

@@ -384,6 +384,7 @@ class Qwen2_5_VisionAttention(nn.Module):
qk_reshaped = einops.rearrange(
qk, "b s two head head_dim -> (two b) s head head_dim", two=2
)
qk_reshaped = qk_reshaped.contiguous()
qk_rotated = self.apply_rotary_emb(
qk_reshaped,
rotary_pos_emb_cos,

View File

@@ -128,8 +128,8 @@ from .vision import (
logger = init_logger(__name__)
# Official recommended max pixels is 24576 * 32 * 32
_MAX_FRAMES_PER_VIDEO = 24576
# Official recommended max frames is 2048
_MAX_FRAMES_PER_VIDEO = 2048
class Qwen3_VisionPatchEmbed(nn.Module):