fix(florence2): load legacy large-ft checkpoints on transformers>=5.14 (#2123)
The published Florence-2 large-ft checkpoints label their BART text config with the legacy remote-code model_type "florence2_language" and route the processor through torch remote code, so they fail to load on the native Florence-2 support in transformers>=5.14 (KeyError: florence2_language, or a torch ImportError). Register the legacy config as a BART config, force the native torch-free processor path, and fall back to CLIPImageProcessor when torchvision is absent. Also mark the encoder-decoder model no_chunked_prefill so the decoder-only chunked prefill (which trims the prompt but not the encoder mask) does not run.
A
Alazer Manakelew committed
ee8806e09a564a342d9ac35e0867d75e84ff5f4f
Parent: e8795bb
Committed by GitHub <noreply@github.com>
on 9/1/2026, 2:22:35 AM