diff --git a/tests/models/test_gguf_download.py b/tests/models/test_gguf_download.py index b1674cdf77..e9ca35afd6 100644 --- a/tests/models/test_gguf_download.py +++ b/tests/models/test_gguf_download.py @@ -113,25 +113,6 @@ class TestGGUFModelLoader: assert result == "/path/to/model.gguf" mock_isfile.assert_called_once_with("/path/to/model.gguf") - @patch("vllm.model_executor.model_loader.gguf_loader.hf_hub_download") - @patch("os.path.isfile", return_value=False) - def test_prepare_weights_https_url(self, mock_isfile, mock_hf_download): - """Test _prepare_weights with HTTPS URL.""" - load_config = LoadConfig(load_format="gguf") - loader = GGUFModelLoader(load_config) - - mock_hf_download.return_value = "/downloaded/model.gguf" - - # Create a simple mock ModelConfig with only the model attribute - model_config = MagicMock() - model_config.model = "https://huggingface.co/model.gguf" - - result = loader._prepare_weights(model_config) - assert result == "/downloaded/model.gguf" - mock_hf_download.assert_called_once_with( - url="https://huggingface.co/model.gguf" - ) - @patch("vllm.model_executor.model_loader.gguf_loader.hf_hub_download") @patch("os.path.isfile", return_value=False) def test_prepare_weights_repo_filename(self, mock_isfile, mock_hf_download): diff --git a/vllm/model_executor/model_loader/gguf_loader.py b/vllm/model_executor/model_loader/gguf_loader.py index e1fb99a5a6..25fa3ba03f 100644 --- a/vllm/model_executor/model_loader/gguf_loader.py +++ b/vllm/model_executor/model_loader/gguf_loader.py @@ -49,11 +49,6 @@ class GGUFModelLoader(BaseModelLoader): model_name_or_path = model_config.model if os.path.isfile(model_name_or_path): return model_name_or_path - # for raw HTTPS link - if model_name_or_path.startswith( - ("http://", "https://") - ) and model_name_or_path.endswith(".gguf"): - return hf_hub_download(url=model_name_or_path) # repo id/filename.gguf if "/" in model_name_or_path and model_name_or_path.endswith(".gguf"): repo_id, filename = model_name_or_path.rsplit("/", 1) @@ -71,7 +66,7 @@ class GGUFModelLoader(BaseModelLoader): raise ValueError( f"Unrecognised GGUF reference: {model_name_or_path} " - "(expected local file, raw URL, /.gguf, " + "(expected local file, /.gguf, " "or :)" )