KeyError: 'grounding-dino'
#15
by
Simiao-Chen
- opened
I'm trying to use Grounding DINO as per the doc, running the code provided here or here. When running the code block, I'm getting an error that just says KeyError: 'grounding-dino'. Including the whole error stack below for context.
D:\anaconda\envs\mondaynew\lib\site-packages\huggingface_hub\file_download.py:945: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
(mondaynew) PS D:\MONDAY> & D:/anaconda/envs/mondaynew/python.exe d:/MONDAY/monday-main/grounding-dino/test.py
D:\anaconda\envs\mondaynew\lib\site-packages\huggingface_hub\file_download.py:945: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
warnings.warn(
Traceback (most recent call last):
D:\anaconda\envs\mondaynew\lib\site-packages\huggingface_hub\file_download.py:945: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
warnings.warn(
Traceback (most recent call last):
File "d:\MONDAY\monday-main\grounding-dino\test.py", line 11, in <module>
model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id).to(device)
File "D:\anaconda\envs\mondaynew\lib\site-packages\transformers\models\auto\auto_factory.py", line 526, in from_pretrained
Traceback (most recent call last):
File "d:\MONDAY\monday-main\grounding-dino\test.py", line 11, in <module>
model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id).to(device)
File "D:\anaconda\envs\mondaynew\lib\site-packages\transformers\models\auto\auto_factory.py", line 526, in from_pretrained
File "d:\MONDAY\monday-main\grounding-dino\test.py", line 11, in <module>
model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id).to(device)
File "D:\anaconda\envs\mondaynew\lib\site-packages\transformers\models\auto\auto_factory.py", line 526, in from_pretrained
model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id).to(device)
File "D:\anaconda\envs\mondaynew\lib\site-packages\transformers\models\auto\auto_factory.py", line 526, in from_pretrained
config, kwargs = AutoConfig.from_pretrained(
File "D:\anaconda\envs\mondaynew\lib\site-packages\transformers\models\auto\configuration_auto.py", line 1098, in from_pretrained
config_class = CONFIG_MAPPING[config_dict["model_type"]]
File "D:\anaconda\envs\mondaynew\lib\site-packages\transformers\models\auto\configuration_auto.py", line 795, in __getitem__
raise KeyError(key)
KeyError: 'grounding-dino'
Any help would be appreciated!
I had no issue using transformers==4.53.3 running model = AutoModelForZeroShotObjectDetection.from_pretrained("IDEA-Research/grounding-dino-base") can you share a code snippet and your transformers version?