transformers
f05cb598 - LFM2-VL: unpad and pixel-unshuffle all images with one gather

Commit
1 day ago
LFM2-VL: unpad and pixel-unshuffle all images with one gather `get_image_features` looped over the images to unpad each one and run the projector on its own grid. One gather (`get_vision_unshuffle_index`) now lays every image's `downsample_factor x downsample_factor` blocks side by side, and the unchanged projector merges them in one call. The index is popped from `kwargs` when precomputed, so a traced graph takes any number of images. The getter also takes `return_flat`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parents
Loading