Skip to content

Commit 3fc9644

Browse files
authored
[Misc] Clean up Aimv2 config registration in Ovis config (#20921)
Signed-off-by: Isotr0py <2037008807@qq.com>
1 parent 0caf61c commit 3fc9644

File tree

1 file changed

+5
-5
lines changed
  • vllm/transformers_utils/configs

1 file changed

+5
-5
lines changed

vllm/transformers_utils/configs/ovis.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ def __init__(
7373
IMAGE_ATOM_ID = -300
7474
IMAGE_INDICATOR_IDS = [-301, -302, -303, -304, -305]
7575

76-
AutoConfig.register("aimv2", AIMv2Config)
77-
7876

7977
# ----------------------------------------------------------------------
8078
# Visual Tokenizer Configuration
@@ -105,9 +103,11 @@ def __init__(self,
105103
f"expect `backbone_config` to be instance of PretrainedConfig or dict, but got {type(backbone_config)} type"
106104
if not isinstance(backbone_config, PretrainedConfig):
107105
model_type = backbone_config['model_type']
108-
backbone_config.pop('model_type')
109-
backbone_config = AutoConfig.for_model(model_type,
110-
**backbone_config)
106+
if model_type != "aimv2":
107+
backbone_config.pop('model_type')
108+
backbone_config = AutoConfig.for_model(model_type, **backbone_config)
109+
else:
110+
backbone_config = AIMv2Config(**backbone_config)
111111
self.backbone_config = backbone_config
112112
self.hidden_stride = hidden_stride
113113

0 commit comments

Comments
 (0)