[Refactor] Move model-specific capability metadata into TTS adapters (#6138)
Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
1 parent
42059f19d5
commit
3781214675
15 files changed
+722
-427
No files matched your search
@@ -27,6 +27,7 @@ from vllm_omni.utils.speaker_cache import (
|
||||
get_speaker_cache,
|
||||
iter_custom_voice_profiles,
|
||||
load_validated_profile_tensors,
|
||||
validate_qwen3_tts_profile,
|
||||
)
|
||||
|
||||
from .configuration_qwen3_tts import Qwen3TTSConfig, Qwen3TTSSpeakerEncoderConfig, Qwen3TTSTalkerConfig
|
||||
@@ -527,7 +528,11 @@ class Qwen3TTSTalkerForConditionalGeneration(nn.Module):
|
||||
tensors = load_validated_profile_tensors(
|
||||
profile,
|
||||
expected_model_type="qwen3_tts",
|
||||
qwen3_embedding_dim=expected_dim,
|
||||
validate_profile=lambda profile, tensors: validate_qwen3_tts_profile(
|
||||
profile,
|
||||
tensors,
|
||||
expected_embedding_dim=expected_dim,
|
||||
),
|
||||
)
|
||||
if tensors is None:
|
||||
continue
|
||||
|
||||
@@ -42,6 +42,7 @@ from vllm_omni.utils.speaker_cache import (
|
||||
get_speaker_cache,
|
||||
iter_custom_voice_profiles,
|
||||
load_validated_profile_tensors,
|
||||
validate_voxcpm2_profile,
|
||||
)
|
||||
from vllm_omni.worker.runner_assisted_metadata import RunnerAssistedFullAttentionMetadataRequest
|
||||
|
||||
@@ -963,7 +964,11 @@ class VoxCPM2TalkerForConditionalGeneration(nn.Module):
|
||||
|
||||
loaded = 0
|
||||
for profile in iter_custom_voice_profiles(custom_voice_dir, expected_model_type="voxcpm2"):
|
||||
tensors = load_validated_profile_tensors(profile, expected_model_type="voxcpm2")
|
||||
tensors = load_validated_profile_tensors(
|
||||
profile,
|
||||
expected_model_type="voxcpm2",
|
||||
validate_profile=validate_voxcpm2_profile,
|
||||
)
|
||||
if tensors is None:
|
||||
continue
|
||||
|
||||
|
||||
Reference in new issue
Block a user