Error when use transformers library
#4
by
Abbasid
- opened
---> 3 from transformers import DepthProImageProcessorFast, DepthProForDepthEstimation
4
5 device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
ImportError: cannot import name 'DepthProImageProcessorFast' from 'transformers' (/usr/local/lib/python3.11/dist-packages/transformers/__init__.py)
and
ValueError: The checkpoint you are trying to load has model type `depth_pro` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.
Yes you are right, you will currently get this error. This is because the code is not merged yet. We are working on a few final checks. Hoping to merge it soon.
This is the open PR which adds the model to transformers: https://github.com/huggingface/transformers/pull/34583
If you want to work with it right now, you can install transformers from this custom branch and it will work
pip install git+https://github.com/geetu040/transformers.git@depth-pro#egg=transformers
Hope that works for you.