Skip to content

Commit 27997ee

Browse files
authored
Fix missing video inputs for PerceptionLM. (#39971)
* Fix missing video inputs for PerceptionLM. * Minor fix for vanilla input image (only C,H,W, no tiles dim). * Revert "Minor fix for vanilla input image (only C,H,W, no tiles dim)." This reverts commit 181d87b.
1 parent bf1bd6a commit 27997ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transformers/models/perception_lm/processing_perception_lm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def __call__(
170170
mm_token_type_ids[array_ids == self.image_token_id] = 1
171171
text_inputs["mm_token_type_ids"] = mm_token_type_ids.tolist()
172172

173-
return BatchFeature(data={**text_inputs, **image_inputs}, tensor_type=return_tensors)
173+
return BatchFeature(data={**text_inputs, **image_inputs, **videos_inputs}, tensor_type=return_tensors)
174174

175175
def _expand_media_tokens(self, sample, media_token: str, media_iter: Iterable):
176176
media_count = sample.count(media_token)

0 commit comments

Comments
 (0)