Merge pull request #52 from vllm-project/dev_qby

[fix] Add support for loading model from a local path
This commit is contained in:
Isotr0py authored and GitHub committed 2025-11-10 16:03:57 +08:00
commit f1d8a00772
1 file changed
+7 -2
@@ -819,9 +819,14 @@ class Qwen2_5OmniForConditionalGeneration(
# Load token2wav weights (if any) # Load token2wav weights (if any)
if token2wav_weights and self.token2wav is not None: if token2wav_weights and self.token2wav is not None:
# download weights from huggingface for spk_dict.pt # download weights from huggingface for spk_dict.pt
model_path = self.vllm_config.model_config.model
download_dir = self.vllm_config.load_config.download_dir
if os.path.exists(model_path):
hf_model_folder = model_path
else:
hf_model_folder = download_weights_from_hf_specific( hf_model_folder = download_weights_from_hf_specific(
self.vllm_config.model_config.model, model_path,
self.vllm_config.load_config.download_dir, download_dir,
allow_patterns=["*.pt"], allow_patterns=["*.pt"],
) )
self._init_token2wav_model(hf_model_folder) self._init_token2wav_model(hf_model_folder)