Skip to content

Segment anything appears incompatible with transformers v5 #110

@EightQuarterBit

Description

@EightQuarterBit

When attempting to run segment anything with transformers v5 installed, the following error occurs:

AttributeError: 'BertModel' object has no attribute 'get_head_mask'

Downgrading to transformers <5 by running pip install "transformers<5" fixes the issue.

When running with transformers v4.57.6 (the latest as of this writing) the following warning printed in the console:

FutureWarning: The device argument is deprecated and will be removed in v5 of Transformers

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