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
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: Thedeviceargument is deprecated and will be removed in v5 of Transformers