[Bugfix] Enable dynamic_dims for different embeds shape (#31223)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung 2025-12-24 10:15:47 +08:00 committed by GitHub
parent ca6a95ba25
commit dd424571c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -111,7 +111,7 @@ class AudioFlamingo3EmbeddingInputs(TensorSchema):
audio_embeds: Annotated[
list[torch.Tensor],
TensorShape("bn", "naf", "hs"),
TensorShape("bn", "naf", "hs", dynamic_dims={"naf"}),
]

View File

@ -139,7 +139,7 @@ class MiniCPMVImageEmbeddingInputs(TensorSchema):
type: Literal["image_embeds"]
image_embeds: Annotated[
torch.Tensor | list[torch.Tensor],
TensorShape("bn", "ns", "hs"),
TensorShape("bn", "ns", "hs", dynamic_dims={"ns"}),
]

View File

@ -101,7 +101,7 @@ class Qwen2AudioEmbeddingInputs(TensorSchema):
audio_embeds: Annotated[
list[torch.Tensor],
TensorShape("bn", "naf", "hs"),
TensorShape("bn", "naf", "hs", dynamic_dims={"naf"}),
]