Uses local Florence2 modules with accelerate-based weight loading and
a custom Florence2Processor for transformers >= 5.0.0, while keeping
the existing loading path for older versions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
In transformers 5.x, forced_bos_token_id was moved from PretrainedConfig
to GenerationConfig. Florence2's custom config accesses this attribute
during init, causing an AttributeError that prevents model loading and
leads to a NoneType crash when the processor is later called.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>