open-compass / open-compass/VLMEvalKit

DOCLING / IDEFICS2 / Mantis / XGenMM fail to import on transformers 5.x: AutoModelForVision2Seq was removed

Open Beginner friendly
#1,675 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4.4k
Forks
768
Avg merge
1d 10h
Merged PRs (30d)
17

Description

AutoModelForVision2Seq was removed in transformers 5.x (renamed to AutoModelForImageTextToText), so four model wrappers fail at import time on recent transformers:

ImportError: cannot import name 'AutoModelForVision2Seq'

Affected (direct, unguarded imports): vlmeval/vlm/granite_docling.py, idefics.py, mantis.py, xgen_mm.py.

granite_vision already handles this with an ImportError fallback (#1404) — the same pattern works for the remaining four. I have a fix ready and can send a PR.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the direct imports in vlmeval/vlm/granite_docling.py, idefics.py, mantis.py, and xgen_mm.py, then compare them with the ImportError fallback already used by granite_vision. Update the four affected wrappers so they import successfully with transformers 5.x, and verify that the modules no longer raise the reported ImportError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
85/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.