Skip to content

Import fails with transformers 5.0.0 - AutoModelForVision2Seq removed #595

@Clasyc

Description

@Clasyc

py/smol.py fails to import with the newly released transformers 5.0.0:

ImportError: cannot import name 'AutoModelForVision2Seq' from 'transformers'

The requirements.txt specifies transformers>=4.45.0 with no upper bound, so pip installs 5.0.0 which removed AutoModelForVision2Seq.

Workaround: Pin to transformers>=4.45.0,<5.0.0
Suggested fix: Update requirements.txt:

- transformers>=4.43.2
+ transformers>=4.43.2,<5.0.0

Or update the import in py/smol.py to use the new transformers 5.0 API if AutoModelForVision2Seq was renamed/moved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions