[BugFix] fix imgs_pos in hunyuan_vl (#29879)

Co-authored-by: Isotr0py <mozf@mail2.sysu.edu.cn>
This commit is contained in:
JackieWu 2025-12-03 14:20:37 +08:00 committed by GitHub
parent c719c40540
commit 0bec63fa31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,7 +123,7 @@ class HunYuanVLProcessor(ProcessorMixin):
attention_mask = input_ids.ne(self.pad_id)
text_inputs["attention_mask"] = attention_mask
text_inputs["imgs_pos"] = [self.get_imgs_pos(input_ids)]
text_inputs["imgs_pos"] = [self.get_imgs_pos(e) for e in input_ids]
# image_inputs["imgs"] = [[image_inputs["pixel_values"]]]
return_tensors = kwargs.pop("return_tensors", None)