{"record":{"id":"65bda38b91ea6f9f","repo":"microsoft/VibeVoice","slug":"unsupported-decoder-model-type-decoder-config-ge","errorCode":null,"errorMessage":"Unsupported decoder model type: {decoder_config.get('model_type', '')}","messagePattern":"Unsupported decoder model type: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vibevoice/modular/configuration_vibevoice.py","lineNumber":241,"sourceCode":"\n        if semantic_tokenizer_config is None:\n            self.semantic_tokenizer_config = self.sub_configs[\"semantic_tokenizer_config\"]()\n        elif isinstance(semantic_tokenizer_config, dict):\n            semantic_tokenizer_config[\"model_type\"] = \"vibevoice_semantic_tokenizer\"\n            self.semantic_tokenizer_config = self.sub_configs[\"semantic_tokenizer_config\"](**semantic_tokenizer_config)\n        elif isinstance(semantic_tokenizer_config, VibeVoiceSemanticTokenizerConfig):\n            # If an instance of the config class is provided\n            self.semantic_tokenizer_config = semantic_tokenizer_config\n\n        if decoder_config is None:\n            self.decoder_config = self.sub_configs[\"decoder_config\"]()\n        elif isinstance(decoder_config, dict):\n            # If a dictionary is provided, instantiate the config class with it\n            # self.decoder_config = self.sub_configs[\"decoder_config\"](**decoder_config)\n            if decoder_config.get(\"model_type\", '') == \"qwen2\":\n                self.decoder_config = Qwen2Config(**decoder_config)\n            else:\n                raise ValueError(f\"Unsupported decoder model type: {decoder_config.get('model_type', '')}\")\n        elif isinstance(decoder_config, (Qwen2Config,)):\n            # If an instance of the config class is provided\n            self.decoder_config = decoder_config\n\n        if diffusion_head_config is None:\n            self.diffusion_head_config = self.sub_configs[\"diffusion_head_config\"]()\n        elif isinstance(diffusion_head_config, dict):\n            diffusion_head_config[\"model_type\"] = \"vibevoice_diffusion_head\"\n            self.diffusion_head_config = self.sub_configs[\"diffusion_head_config\"](**diffusion_head_config)\n        elif isinstance(diffusion_head_config, VibeVoiceDiffusionHeadConfig):\n            # If an instance of the config class is provided\n            self.diffusion_head_config = diffusion_head_config\n\n        # other parameters\n        self.acoustic_vae_dim = getattr(self.acoustic_tokenizer_config, 'vae_dim', 64)\n        self.semantic_vae_dim = getattr(self.semantic_tokenizer_config, 'vae_dim', 128)\n\n        super().__init__(**kwargs)","sourceCodeStart":223,"sourceCodeEnd":259,"githubUrl":"https://github.com/microsoft/VibeVoice/blob/94da20d98b2fa7688e9cbfaf7692ddb4954f7600/vibevoice/modular/configuration_vibevoice.py#L223-L259","documentation":"In VibeVoiceConfig.__init__ (non-streaming, vibevoice/modular/configuration_vibevoice.py:241), when decoder_config is passed as a dict its model_type must be exactly 'qwen2'; anything else raises ValueError. The library hard-wires Qwen2Config as the only supported decoder backbone, so this error is a config-shape guard, not a runtime failure.","triggerScenarios":"Constructing VibeVoiceConfig(decoder_config={'model_type': 'qwen3', ...}), omitting model_type, or loading a saved config.json whose decoder_config.model_type was edited to another architecture.","commonSituations":"Hand-editing config.json to swap the decoder for a newer Qwen variant; merging configs from a different model family; a fine-tune export that rewrote model_type.","solutions":["Set decoder_config.model_type to 'qwen2' (the only supported decoder) in the dict or config.json.","If you meant a different decoder, you must implement/register a matching branch in configuration_vibevoice.py — no other type is accepted.","Regenerate config.json from_pretrained on the original checkpoint instead of editing it by hand.","Check for silent corruption: json.load the config and inspect decoder_config['model_type'] before loading."],"exampleFix":"# before\nVibeVoiceConfig(decoder_config={\"model_type\": \"qwen3\", \"hidden_size\": 896})\n\n# after\nVibeVoiceConfig(decoder_config={\"model_type\": \"qwen2\", \"hidden_size\": 896})","handlingStrategy":"validation","validationCode":"SUPPORTED_DECODERS = {\"qwen2\"}\nif isinstance(decoder_config, dict) and decoder_config.get(\"model_type\") not in SUPPORTED_DECODERS:\n    raise SystemExit(f\"decoder_config.model_type must be one of {SUPPORTED_DECODERS}\")","typeGuard":"def is_supported_decoder(cfg: dict) -> bool:\n    return isinstance(cfg, dict) and cfg.get(\"model_type\") == \"qwen2\"","tryCatchPattern":"try:\n    VibeVoiceConfig(decoder_config=decoder_config)\nexcept ValueError as e:\n    decoder_config = {**decoder_config, \"model_type\": \"qwen2\"}\n    VibeVoiceConfig(decoder_config=decoder_config)","preventionTips":["Never hand-edit decoder model_type in config.json","Diff configs against the upstream checkpoint","Validate config dicts before constructor calls"],"tags":["configuration","decoder","qwen2","valueerror"],"backgroundTag":null,"analyzedSha":"94da20d98b2fa7688e9cbfaf7692ddb4954f7600","analyzedAt":"2026-08-15T04:12:07.418Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}