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:
57 files changed
+259
-220
No files matched your search
@@ -1,3 +1,6 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
||||
|
||||
from collections.abc import Iterable, Mapping
|
||||
from dataclasses import replace
|
||||
from functools import cached_property
|
||||
@@ -6,7 +9,6 @@ from pathlib import Path
|
||||
import regex as re
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
from huggingface_hub import hf_hub_download
|
||||
from vllm.config import VllmConfig
|
||||
from vllm.logger import init_logger
|
||||
from vllm.model_executor.models.interfaces import SupportsMultiModal
|
||||
@@ -28,6 +30,7 @@ from vllm_omni.model_executor.models.voxtral_tts.voxtral_tts_audio_generation im
|
||||
VoxtralTTSMultiModalProcessor,
|
||||
VoxtralTTSProcessingInfo,
|
||||
)
|
||||
from vllm_omni.transformers_utils.repo_utils import hf_api
|
||||
|
||||
logger = init_logger(__name__)
|
||||
|
||||
@@ -133,7 +136,7 @@ class VoxtralTTSForConditionalGeneration(
|
||||
self.voice_to_embedding = {}
|
||||
for sid in speaker_id:
|
||||
if self.is_hf_model:
|
||||
path = hf_hub_download(repo_id=self.repo_id, filename=f"voice_embedding/{sid}.pt")
|
||||
path = hf_api().hf_hub_download(repo_id=self.repo_id, filename=f"voice_embedding/{sid}.pt")
|
||||
else:
|
||||
path = Path(self.repo_id) / "voice_embedding" / f"{sid}.pt"
|
||||
if Path(path).exists():
|
||||
|
||||
Reference in new issue
Block a user