Repository: huggingface/transformers
Pull request: Fix `mlcd` auto config/model/mapping issues

# What does this PR do?

It's unclear why the config class has `model_type = "mlcd_vision_model"` but the model on the hub has "model_type": "mlcd".

This leads to the following failures (load from hub --> save locally --> local locally)


```
from transformers import MLCDVisionConfig, AutoConfig, AutoImageProcessor, AutoModel

ckpt = "DeepGlint-AI/mlcd-vit-bigG-patch14-336"
local_ckpt = "ckpt_mlcd"

config = AutoConfig.from_pretrained(ckpt)
config.save_pretrained(local_ckpt)
AutoConfig.from_pretrained(local_ckpt)  --> will fail

model = AutoModel.from_pretrained(ckpt)
model.save_pretrained(local_ckpt)
model_local = AutoModel.from_pretrained(local_ckpt) --> will fail too (after comment out the above one)
```

The error is

> The checkpoint you are trying to load has model type `mlcd_vision_model` but Transformers does not recognize this architecture. ...



Changed files:
filename: src/transformers/models/auto/configuration_auto.py
patch: @@ -288,7 +288,8 @@
         ("mistral", "MistralConfig"),
         ("mistral3", "Mistral3Config"),
         ("mixtral", "MixtralConfig"),
-        ("mlcd", "MLCDVisionConfig"),
+        ("mlcd", "MLCDVisionConfig"),  # Keep this to make some original hub repositories (from `DeepGlint-AI`) works
+        ("mlcd_vision_model", "MLCDVisionConfig"),
         ("mllama", "MllamaConfig"),
         ("mm-grounding-dino", "MMGroundingDinoConfig"),
         ("mobilebert", "MobileBertConfig"),
@@ -797,7 +798,8 @@
         ("mistral", "Mistral"),
         ("mistral3", "Mistral3"),
         ("mixtral", "Mixtral"),
-        ("mlcd", "MLCD"),
+        ("mlcd", "MLCD"),  # Keep this to make some original hub repositories (from `DeepGlint-AI`) works
+        ("mlcd_vision_model", "MLCD"),
         ("mllama", "Mllama"),
         ("mluke", "mLUKE"),
         ("mm-grounding-dino", "MM Grounding DINO"),
@@ -1054,6 +1056,7 @@
         ("donut-swin", "donut"),
         ("kosmos-2", "kosmos2"),
         ("kosmos-2.5", "kosmos2_5"),
+        ("mlcd_vision_model", "mlcd"),
         ("omdet-turbo", "omdet_turbo"),
         ("maskformer-swin", "maskformer"),
         ("xclip", "x_clip"),

filename: src/transformers/models/auto/modeling_auto.py
patch: @@ -283,7 +283,8 @@ class _BaseModelWithGenerate(PreTrainedModel, GenerationMixin):
         ("mistral", "MistralModel"),
         ("mistral3", "Mistral3Model"),
         ("mixtral", "MixtralModel"),
-        ("mlcd", "MLCDVisionModel"),
+        ("mlcd", "MLCDVisionModel"),  # Keep this to make some original hub repositories (from `DeepGlint-AI`) works
+        ("mlcd_vision_model", "MLCDVisionModel"),
         ("mllama", "MllamaModel"),
         ("mm-grounding-dino", "MMGroundingDinoModel"),
         ("mobilebert", "MobileBertModel"),
@@ -770,7 +771,8 @@ class _BaseModelWithGenerate(PreTrainedModel, GenerationMixin):
         ("imagegpt", "ImageGPTModel"),
         ("levit", "LevitModel"),
         ("llama4", "Llama4VisionModel"),
-        ("mlcd", "MLCDVisionModel"),
+        ("mlcd", "MLCDVisionModel"),  # Keep this to make some original hub repositories (from `DeepGlint-AI`) works
+        ("mlcd_vision_model", "MLCDVisionModel"),
         ("mllama", "MllamaVisionModel"),
         ("mobilenet_v1", "MobileNetV1Model"),
         ("mobilenet_v2", "MobileNetV2Model"),