Fix AttributeError: Florence2LanguageConfig has no attribute forced_bos_token_id

#121

transformers v5 no longer auto-sets generation params (like forced_bos_token_id) as config instance attributes β€” see MIGRATION_GUIDE_V5.md, 'Modeling > Generate'. This config subclass read self.forced_bos_token_id assuming the old behavior.

Minimal, single-line fix, scoped to this file only. Related: kijai/ComfyUI-Florence2#187, #199, Comfy-Org/ComfyUI#12277, Lightricks/ComfyUI-LTXVideo#394 all hit this same symptom. #119 also contains this fix but bundles it with a full-repo rewrite that corrupts config.json (swaps in Florence-2-base's architecture dimensions), so it's not safe to merge as-is β€” this PR is scoped to just the AttributeError.

masterofaudio2077 changed pull request status to closed

Sign up or log in to comment