4646VIBEVOICE_EXECUTABLE_MODEL_ID = "vibevoice/VibeVoice-1.5B-hf"
4747VIBEVOICE_EXECUTABLE_REVISION = "edc39f80f5cae656da37baf8faa8f5502bf7081f"
4848VIBEVOICE_MICROSOFT_PROVENANCE_REVISION = VIBEVOICE_REVISION
49+ VIBEVOICE_ASR_STREAMING_MODEL_REVISIONS = {
50+ "microsoft/VibeVoice-ASR-Streaming-1.5B" : "4262d23d8a539a6530cf64fbd0b1751ef9a30853" ,
51+ "microsoft/VibeVoice-ASR-Streaming-7B" : "60d858b518b4e19d404af3737f848fc185b30177" ,
52+ }
53+ VIBEVOICE_ASR_STREAMING_MODEL_ID = "microsoft/VibeVoice-ASR-Streaming-1.5B"
54+ VIBEVOICE_ASR_STREAMING_REVISION = VIBEVOICE_ASR_STREAMING_MODEL_REVISIONS [
55+ VIBEVOICE_ASR_STREAMING_MODEL_ID
56+ ]
57+ VIBEVOICE_ASR_STREAMING_SOURCE_REVISION = "505653d3873b065a488aea551c6ee3dc51d3062f"
4958
5059
5160@dataclasses .dataclass (frozen = True )
5261class VibeVoiceSources :
53- """Immutable provenance for one VibeVoice TTS build .
62+ """Immutable provenance for one supported VibeVoice checkpoint .
5463
55- ``model_id`` and ``weight_revision`` are always the user's checkpoint. The
56- official 1.5B release predates Transformers-native VibeVoice metadata, so
57- its executable config and processor are resolved from the pinned conversion
58- mirror while its official weights remain the only downloaded weights.
64+ ``model_id`` and ``weight_revision`` are always the user's checkpoint.
65+ ``weight_layout`` is set only when the module accepts an explicit checkpoint
66+ layout during weight preprocessing.
5967 """
6068
6169 model_id : str
@@ -64,18 +72,10 @@ class VibeVoiceSources:
6472 config_revision : str
6573 processor_model_id : str
6674 processor_revision : str
67- weight_layout : str
75+ weight_layout : str | None
6876
6977
7078_UNSUPPORTED_VIBEVOICE_MODELS = {
71- "microsoft/VibeVoice-ASR-Streaming-7B" : (
72- "VibeVoice ASR Streaming requires the VibeVoice-ASR streaming task, "
73- "which Mobius does not export yet."
74- ),
75- "microsoft/VibeVoice-ASR-Streaming-1.5B" : (
76- "VibeVoice ASR Streaming requires the VibeVoice-ASR streaming task, "
77- "which Mobius does not export yet."
78- ),
7979 "microsoft/VibeVoice-ASR-BitNet" : (
8080 "VibeVoice ASR BitNet requires the VibeVoice-ASR task and BitNet "
8181 "weight loader, which Mobius does not export yet."
@@ -104,6 +104,25 @@ def resolve_vibevoice_sources(model_id: str, revision: str | None) -> VibeVoiceS
104104 raise NotImplementedError (
105105 f"{ model_id } is unsupported: { unsupported [canonical_model_id ]} "
106106 )
107+ streaming_revisions = {
108+ known_model_id .casefold (): pinned_revision
109+ for known_model_id , pinned_revision in VIBEVOICE_ASR_STREAMING_MODEL_REVISIONS .items ()
110+ }
111+ if canonical_model_id in streaming_revisions :
112+ pinned_revision = streaming_revisions [canonical_model_id ]
113+ if revision not in {None , pinned_revision }:
114+ raise ValueError (
115+ f"{ model_id } is only verified at revision { pinned_revision } ; got { revision } ."
116+ )
117+ return VibeVoiceSources (
118+ model_id = model_id ,
119+ weight_revision = pinned_revision ,
120+ config_model_id = model_id ,
121+ config_revision = pinned_revision ,
122+ processor_model_id = model_id ,
123+ processor_revision = pinned_revision ,
124+ weight_layout = None ,
125+ )
107126 if canonical_model_id == VIBEVOICE_MODEL_ID .casefold ():
108127 if revision not in {None , VIBEVOICE_REVISION }:
109128 raise ValueError (
@@ -1233,17 +1252,6 @@ def preprocess_weights(
12331252 return routed
12341253
12351254
1236- VIBEVOICE_ASR_STREAMING_MODEL_REVISIONS = {
1237- "microsoft/VibeVoice-ASR-Streaming-1.5B" : "4262d23d8a539a6530cf64fbd0b1751ef9a30853" ,
1238- "microsoft/VibeVoice-ASR-Streaming-7B" : "60d858b518b4e19d404af3737f848fc185b30177" ,
1239- }
1240- VIBEVOICE_ASR_STREAMING_MODEL_ID = "microsoft/VibeVoice-ASR-Streaming-1.5B"
1241- VIBEVOICE_ASR_STREAMING_REVISION = VIBEVOICE_ASR_STREAMING_MODEL_REVISIONS [
1242- VIBEVOICE_ASR_STREAMING_MODEL_ID
1243- ]
1244- VIBEVOICE_ASR_STREAMING_SOURCE_REVISION = "505653d3873b065a488aea551c6ee3dc51d3062f"
1245-
1246-
12471255class VibeVoiceASRStreamingAudioEncoder (nn .Module ):
12481256 """Encode waveform chunks with streaming ASR's two causal tokenizers."""
12491257
0 commit comments