Add vLLM-Omni library info to Hugging Face Hub requests (#5381)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
authored and GitHub committed 2026-09-08 10:08:38 -06:00
1 parent 7a80b79698
commit fdaf4e31bd
57 files changed
+259 -220

No files matched your search

+2 -2
View File
@@ -201,9 +201,9 @@ def _load_model_chat_template_json(model: str) -> str | None:
if template_path is None:
try:
from huggingface_hub import hf_hub_download
from vllm_omni.transformers_utils.repo_utils import hf_api
template_path = hf_hub_download(
template_path = hf_api().hf_hub_download(
repo_id=model,
filename="chat_template.json",
local_files_only=True,
@@ -116,9 +116,9 @@ class CosyVoice3Adapter(ARTTSAdapter):
if tokenizer is None:
model_path = server.engine_client.model_config.model
if not os.path.isdir(model_path):
from huggingface_hub import snapshot_download
from vllm_omni.transformers_utils.repo_utils import hf_api
model_path = snapshot_download(model_path)
model_path = hf_api().snapshot_download(model_path)
tokenizer = get_qwen_tokenizer(
token_path=os.path.join(model_path, hf_cfg.qwen_pretrain_path),
skip_special_tokens=hf_cfg.skip_special_tokens,