microsoft/VibeVoice · error · RuntimeError

VibeVoiceStreamingModel.forward is intentionally disabled. U

Error message

VibeVoiceStreamingModel.forward is intentionally disabled. Use `model.language_model(...)` or `model.tts_language_model(...)` instead.

What it means

VibeVoiceStreamingModel deliberately disables nn.Module-style forward. The model is split into language_model (text layers) and tts_language_model (TTS upper layers), and a monolithic forward would hide that split, so calling model(...) always raises RuntimeError with instructions. This is an API-contract error, not a malfunction.

Source

Thrown at vibevoice/modular/modeling_vibevoice_streaming.py:179

            self.acoustic_tokenizer.eval()
    
    def forward(self, *args, **kwargs):
        """
        Intentionally not implemented.

        This streaming model is split into two explicit submodules:
          - `language_model`      for plain text processing (lower layers).
          - `tts_language_model`  for TTS-related upper layers.

        We deliberately avoid a unified `forward` to prevent accidental calls
        that mix responsibilities.

        To use the model:
          - Call `self.language_model(...)` for text embeddings / hidden states.
          - Call `self.tts_language_model(...)` for the TTS portion.
          - Use the dedicated inference class for combined generation logic.
        """
        raise RuntimeError(
            "VibeVoiceStreamingModel.forward is intentionally disabled. "
            "Use `model.language_model(...)` or `model.tts_language_model(...)` instead."
        )


AutoModel.register(VibeVoiceStreamingConfig, VibeVoiceStreamingModel)

__all__ = [
    "VibeVoiceStreamingPreTrainedModel",
    "VibeVoiceStreamingModel",
]

View on GitHub (pinned to 94da20d98b)

Solutions

  1. Use model.language_model(...) for text hidden states and model.tts_language_model(...) for TTS layers.
  2. For end-to-end generation, use the dedicated inference wrapper class (VibeVoiceStreamingForInference / generate) instead of the raw module.
  3. Audit third-party wrappers that call module(...) and route them to the explicit submodules.
  4. Do not attempt to bypass by defining forward — the split is intentional for correct staged inference.

Example fix

# before
out = streaming_model(input_ids=ids)  # RuntimeError

# after
hidden = streaming_model.language_model(input_ids=ids)
tts_out = streaming_model.tts_language_model(hidden_states=hidden.last_hidden_state)
Defensive patterns

Strategy: type-guard

Validate before calling

def call_streaming(model, **kwargs):
    if hasattr(model, "language_model") and hasattr(model, "tts_language_model"):
        raise TypeError("Use model.language_model()/tts_language_model()/generate, not model(...)")
    return model(**kwargs)

Type guard

from vibevoice.modular.modeling_vibevoice_streaming import VibeVoiceStreamingModel

def has_disabled_forward(model) -> bool:
    return isinstance(model, VibeVoiceStreamingModel)

Try / catch

try:
    out = model(input_ids=ids)
except RuntimeError as e:
    if "intentionally disabled" in str(e):
        out = model.language_model(input_ids=ids)  # route explicitly
    else:
        raise

Prevention

When it happens

Trigger: Calling model(input_ids=...) directly on a VibeVoiceStreamingModel (including via generic HF helpers like from_pretrained(...)(...) or wrappers that invoke .forward); passing the model to code that assumes a callable module.

Common situations: Porting code from the non-streaming VibeVoiceModel which does have forward; generic wrappers (accelerate, custom loops) that call module(*inputs); copy-paste of standard transformers usage patterns.

Related errors


AI-assisted analysis of microsoft/VibeVoice@94da20d98b (2026-08-15). Data as JSON: /api/errors/512a65c4be8342e5. Report an issue: GitHub.