File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
vllm_omni/model_executor/models/qwen3_tts Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 4343from transformers .utils import can_return_tuple , logging
4444from transformers .utils .hub import cached_file
4545
46+ from vllm_omni .model_executor .model_loader .weight_utils import download_weights_from_hf_specific
47+
4648from .configuration_qwen3_tts import (
4749 Qwen3TTSConfig ,
4850 Qwen3TTSSpeakerEncoderConfig ,
@@ -1844,6 +1846,15 @@ def from_pretrained(
18441846 weights_only = weights_only ,
18451847 ** kwargs ,
18461848 )
1849+ if not local_files_only and not os .path .isdir (pretrained_model_name_or_path ):
1850+ download_cache_dir = kwargs .get ("cache_dir" , cache_dir )
1851+ download_revision = kwargs .get ("revision" , revision )
1852+ download_weights_from_hf_specific (
1853+ pretrained_model_name_or_path ,
1854+ cache_dir = download_cache_dir ,
1855+ allow_patterns = ["speech_tokenizer/*" ],
1856+ revision = download_revision ,
1857+ )
18471858 speech_tokenizer_path = cached_file (
18481859 pretrained_model_name_or_path ,
18491860 "speech_tokenizer/config.json" ,
You can’t perform that action at this time.
0 commit comments