[CI] Avoid unnecessary Hugging Face metadata requests (#49508)
Signed-off-by: Andreas Karatzas <Andreas.Karatzas@amd.com>
Andreas Karatzas committed
Jul 24, 2026 at 14:33 UTC
7e51939e25c34e6527a4971345c95dbefb029fc9
2 files changed
+7
-4
vllm/config/model.py
+6
-3
@@ -579,9 +579,9 @@ class ModelConfig:
579
self.hf_text_config, "attention_chunk_size", None
580
)
581
self.encoder_config = self._get_encoder_config()
582
- self.hf_image_processor_config = get_hf_image_processor_config(
583
- self.model, hf_token=self.hf_token, revision=self.revision
584
- )
582
+ # Image-processor metadata is only consumed by multimodal models.
583
+ # Probing it for text-only models causes avoidable Hub requests.
584
+ self.hf_image_processor_config: dict[str, Any] = {}
585
586
architectures = self.architectures
587
registry = self.registry
@@ -703,6 +703,9 @@ class ModelConfig:
703
704
# Init multimodal config if needed
705
if self._model_info.supports_multimodal:
706
+ self.hf_image_processor_config = get_hf_image_processor_config(
707
+ self.model, hf_token=self.hf_token, revision=self.revision
708
+ )
709
if (
710
mm_encoder_tp_mode == "data"
711
and not self._model_info.supports_multimodal_encoder_tp_data
vllm/model_executor/model_loader/default_loader.py
+1
-1
@@ -220,7 +220,7 @@ class DefaultModelLoader(BaseModelLoader):
220
# safetensors file. Using both breaks.
221
# Here, we download the `model.safetensors.index.json` and filter
222
# any files not found in the index.
223
- if not is_local:
223
+ if not is_local and len(hf_weights_files) > 1:
224
download_safetensors_index_file_from_hf(
225
model_name_or_path,
226
index_file,