KeyError: 'grounding-dino'
Author: htshnr
Pull request: no

### System Info

I'm trying to use Grounding DINO as per the doc, running the code provided [here](https://huggingface.co/docs/transformers/en/model_doc/grounding-dino) or [here](https://huggingface.co/IDEA-Research/grounding-dino-tiny). When running the code block, I'm getting an error that just says KeyError: 'grounding-dino'. Including the whole error stack below for context.

```
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Cell In[35], line 10
      7 model_id = "IDEA-Research/grounding-dino-tiny"
      9 processor = AutoProcessor.from_pretrained(model_id)
---> 10 model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id).to(device)
     12 image_url = "http://images.cocodataset.org/val2017/000000039769.jpg"
     13 image = Image.open(requests.get(image_url, stream=True).raw)

File /workspace/venv/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py:456, in from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
    448 trust_remote_code = kwargs.pop("trust_remote_code", None)
    449 kwargs["_from_auto"] = True
    450 hub_kwargs_names = [
    451     "cache_dir",
    452     "force_download",
    453     "local_files_only",
    454     "proxies",
    455     "resume_download",
--> 456     "revision",
    457     "subfolder",
    458     "use_auth_token",
    459     "token",
    460 ]
    461 hub_kwargs = {name: kwargs.pop(name) for name in hub_kwargs_names if name in kwargs}
    462 code_revision = kwargs.pop("code_revision", None)

File /workspace/venv/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py:957, in AutoConfig.from_pretrained(cls, pretrained_model_name_or_path, **kwargs)
    955     return config_class.from_pretrained(pretrained_model_name_or_path, **kwargs)
    956 elif "model_type" in config_dict:
--> 957     config_class = CONFIG_MAPPING[config_dict["model_type"]]
    958     return config_class.from_dict(config_dict, **unused_kwargs)
    959 else:
    960     # Fallback: use pattern matching on the string.
    961     # We go from longer names to shorter names to catch roberta before bert (for instance)

File /workspace/venv/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py:671, in _LazyConfigMapping.__getitem__(self, key)
    669     return self._extra_content[key]
    670 if key not in self._mapping:
--> 671     raise KeyError(key)
    672 value = self._mapping[key]
    673 module_name = model_type_to_module_name(key)

KeyError: 'grounding-dino'
```

I'm using the latest transformers release, even updated using !pip install --upgrade -q git+https://github.com/huggingface/transformers to the latest version: 4.42.0.dev0.

Any help would be appreciated!

### Who can help?

@amyeroberts 

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

```
import requests

import torch
from PIL import Image
from transformers import AutoProcessor, AutoModelForZeroShotObjectDetection

model_id = "IDEA-Research/grounding-dino-tiny"

processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id).to(device)

image_url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(image_url, stream=True).raw)
# Check for cats and remote controls
text = "a cat. a remote control."

inputs = processor(images=image, text=text, return_tensors="pt").to(device)
with torch.no_grad():
    outputs = model(**inputs)

results = processor.post_process_grounded_object_detection(
    outputs,
    inputs.input_ids,
    box_threshold=0.4,
    text_threshold=0.3,
    target_sizes=[image.size[::-1]]
)
```

### Expected behavior

The library loads Grounding DINO.

Comments:
Hi @htshnr, thanks for raising this issue! 

~Could you share the running environment: run `transformers-cli env` in the terminal and copy-paste the output?~

~I'm unable to reproduce this on `main`~

Woops sorry - just reread and  can see it's on the development branch

It's very peculiar, as I'm able to run the provided snippet without issue. Could you in a python session run the following to see what version of transformers is being run there? 

```
python -c "import transformers; print(transformers.__version__)"
```

After updating my transformers library, running print(transformers.__version__) was displaying the latest version, which is why I forgot to restart my kernel. Doing so led to the code snippet working. Just putting this out there for anyone else who may come across this.

Marking as closed, thank you!