transformers
c35c54a1 - Merge kwargs in `_get_num_multimodal_tokens` of Ovis2.5, Fuyu, MUSE and Granite-Docling (#51379)

Commit
12 hours ago
Merge kwargs in `_get_num_multimodal_tokens` of Ovis2.5, Fuyu, MUSE and Granite-Docling (#51379) Ovis2.5, Fuyu, MUSE Glimmer, MUSE Spark and Granite-Docling read the raw kwargs in `_get_num_multimodal_tokens`, so kwargs nested in `images_kwargs` or `videos_kwargs` were ignored. Merge them as the processor call does. The common count tests now also load the image or video processor with another `size` and pass the tested kwargs and `size` at call time, flat and nested. Fuyu's own count test passes a nested `size`, and the MUSE testers count with `max_image_tokens`.
Author
Parents
Loading