[Bugfix] fix the ima issue of qwen-vit (#32687)
Signed-off-by: JJJYmmm <92386084+JJJYmmm@users.noreply.github.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user