[V1][VLM][Pixtral-HF] Support Pixtral-HF on V1 (#14275)

Signed-off-by: Linkun Chen <github@lkchen.net>
This commit is contained in:
lkchen
2025-03-06 00:58:41 -08:00
committed by GitHub
parent 1769928079
commit 5d802522a7
4 changed files with 175 additions and 16 deletions

View File

@@ -1484,8 +1484,8 @@ class MolmoForCausalLM(nn.Module, SupportsMultiModal, SupportsPP, SupportsLoRA,
img_patch_id = kwargs.pop("img_patch_id", None)
if not isinstance(img_patch_id, torch.Tensor):
raise ValueError("Incorrect type of num_crops. "
f"Got type: {type(num_crops)}")
raise ValueError("Incorrect type of img_patch_id. "
f"Got type: {type(img_patch_id)}")
self.img_patch_id = img_patch_id.flatten().unique().item()
return MolmoImageInputs(