{"record":{"id":"2056bb2289dcc1c1","repo":"sgl-project/sglang","slug":"invalid-vae-type-self-vae-type","errorCode":null,"errorMessage":"Invalid VAE type: {self.vae_type}","messagePattern":"Invalid VAE type: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/models/dits/mova_audio_dit.py","lineNumber":193,"sourceCode":"        self.previous_e0_even = None\n        self.previous_e0_odd = None\n        self.previous_residual_even = None\n        self.previous_residual_odd = None\n        self.is_even = False\n        self.should_calc_even = True\n        self.should_calc_odd = True\n        self.accumulated_rel_l1_distance_even = 0\n        self.accumulated_rel_l1_distance_odd = 0\n        self.__post_init__()\n\n    def _init_freqs(self):\n        if self.freqs is not None:\n            return\n        head_dim = self.dim // self.num_heads\n        if self.vae_type == \"dac\":\n            self.freqs = precompute_freqs_cis_1d(head_dim)\n        else:\n            raise ValueError(f\"Invalid VAE type: {self.vae_type}\")\n\n    def patchify(\n        self,\n        x: torch.Tensor,\n        control_camera_latents_input: Optional[torch.Tensor] = None,\n    ):\n        x = self.patch_embedding(x)\n        grid_size = x.shape[2:]\n        x = rearrange(x, \"b c f -> b f c\").contiguous()\n        return x, grid_size  # x, grid_size: (f)\n\n    def unpatchify(self, x: torch.Tensor, grid_size: tuple[int]):\n        return rearrange(\n            x, \"b f (p c) -> b c (f p)\", f=grid_size[0], p=self.patch_size[0]\n        )\n\n    def forward(\n        self,","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/models/dits/mova_audio_dit.py#L175-L211","documentation":"mova_audio_dit's frequency precomputation only supports vae_type == \"dac\"; any other value raises. The RoPE freqs depend on the audio VAE layout, so unsupported VAEs are rejected explicitly.","triggerScenarios":"Instantiating the audio DiT with a config whose vae_type is not \"dac\" (e.g. a video VAE type string leaking into the audio model config).","commonSituations":"Sharing one config object between video and audio model construction; typo'd vae_type; new audio codec support not implemented.","solutions":["Set vae_type to \"dac\" in the audio DiT config (only supported audio VAE)","Check that the audio model config is not accidentally reusing the video model's vae_type","Update the library if you need a different audio VAE — it is unimplemented"],"exampleFix":"# before\naudio_cfg = dict(vae_type=\"mova\")\n# after\naudio_cfg = dict(vae_type=\"dac\")","handlingStrategy":"validation","validationCode":"assert audio_cfg[\"vae_type\"] == \"dac\", audio_cfg[\"vae_type\"]","typeGuard":"def is_supported_audio_vae(cfg) -> bool:\n    return cfg.get(\"vae_type\") == \"dac\"","tryCatchPattern":null,"preventionTips":["Keep audio and video model configs separate","Test vae_type early at config load, not lazily at first forward"],"tags":["mova-audio-dit","vae-type","unsupported-config"],"backgroundTag":"unsupported-configuration-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}