[Model] Use merge_by_field_config for MM models (Ovis family) (#26308)

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
This commit is contained in:
Isotr0py
2025-10-07 20:54:22 +08:00
committed by GitHub
parent 63773a6200
commit 08d26a1b7e
5 changed files with 86 additions and 81 deletions

View File

@@ -408,7 +408,7 @@ class OvisProcessor(ProcessorMixin):
crops.insert(0, image)
pixel_values = torch.cat([_preprocess(crop, side) for crop in crops], dim=0)
image_placeholders = self.construct_image_placeholders(grid)
return pixel_values, image_placeholders, grid
return torch.tensor(pixel_values), image_placeholders, torch.tensor(grid)
def batch_decode(self, *args, **kwargs):
"""