{"record":{"id":"a6d846f8a1b2aa0b","repo":"microsoft/VibeVoice","slug":"final-sigmas-type-must-be-one-of-zero-or-sig","errorCode":null,"errorMessage":"`final_sigmas_type` must be one of 'zero', or 'sigma_min', but got {self.config.final_sigmas_type}","messagePattern":"`final_sigmas_type` must be one of 'zero', or 'sigma_min', but got (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vibevoice/schedule/dpm_solver.py","lineNumber":404,"sourceCode":"\n        if self.config.use_karras_sigmas:\n            sigmas = np.flip(sigmas).copy()\n            sigmas = self._convert_to_karras(in_sigmas=sigmas, num_inference_steps=num_inference_steps)\n            timesteps = np.array([self._sigma_to_t(sigma, log_sigmas) for sigma in sigmas]).round()\n        elif self.config.use_lu_lambdas:\n            lambdas = np.flip(log_sigmas.copy())\n            lambdas = self._convert_to_lu(in_lambdas=lambdas, num_inference_steps=num_inference_steps)\n            sigmas = np.exp(lambdas)\n            timesteps = np.array([self._sigma_to_t(sigma, log_sigmas) for sigma in sigmas]).round()\n        else:\n            sigmas = np.interp(timesteps, np.arange(0, len(sigmas)), sigmas)\n\n        if self.config.final_sigmas_type == \"sigma_min\":\n            sigma_last = ((1 - self.alphas_cumprod[0]) / self.alphas_cumprod[0]) ** 0.5\n        elif self.config.final_sigmas_type == \"zero\":\n            sigma_last = 0\n        else:\n            raise ValueError(\n                f\"`final_sigmas_type` must be one of 'zero', or 'sigma_min', but got {self.config.final_sigmas_type}\"\n            )\n\n        sigmas = np.concatenate([sigmas, [sigma_last]]).astype(np.float32)\n\n        self.sigmas = torch.from_numpy(sigmas)\n        self.timesteps = torch.from_numpy(timesteps).to(device=device, dtype=torch.int64)\n\n        self.num_inference_steps = len(timesteps)\n\n        self.model_outputs = [\n            None,\n        ] * self.config.solver_order\n        self.lower_order_nums = 0\n\n        # add an index counter for schedulers that allow duplicated timesteps\n        self._step_index = None\n        self._begin_index = None","sourceCodeStart":386,"sourceCodeEnd":422,"githubUrl":"https://github.com/microsoft/VibeVoice/blob/94da20d98b2fa7688e9cbfaf7692ddb4954f7600/vibevoice/schedule/dpm_solver.py#L386-L422","documentation":"While building the sigma array, `set_timesteps` reads `config.final_sigmas_type` to decide the last sigma: `\"sigma_min\"` uses the smallest trained sigma, `\"zero\"` appends 0. Any other string reaches this ValueError. Note the constructor only cross-checks `zero` against algorithm_type (error 46); an arbitrary invalid value slips through construction and only fails here, at set_timesteps time.","triggerScenarios":"Constructing with `final_sigmas_type=\"sigma\"`, `\"zeromin\"`, or a case variant like `\"Zero\"`, then calling `set_timesteps(N)`.","commonSituations":"Hand-written configs with typos; values copied from other scheduler families (some use `sigma_last` or different names); serialised configs that lost the field default and stored an empty string.","solutions":["Set final_sigmas_type to \"sigma_min\" (default) or \"zero\" (only with dpmsolver++/sde-dpmsolver++).","If the config value is missing/empty, delete the key so the scheduler default applies.","Validate config right after loading because construction does not catch this value."],"exampleFix":"# before\nDPMSolverMultistepScheduler(..., final_sigmas_type=\"sigma\")\n\n# after\nDPMSolverMultistepScheduler(..., final_sigmas_type=\"sigma_min\")","handlingStrategy":"validation","validationCode":"FINAL = {\"zero\", \"sigma_min\"}\ncfg = scheduler.config.final_sigmas_type\nif cfg not in FINAL:\n    raise ValueError(f\"final_sigmas_type {cfg!r} invalid; choose from {sorted(FINAL)}\")\nscheduler.set_timesteps(30)","typeGuard":"def is_supported_final_sigmas_type(v) -> bool:\n    return isinstance(v, str) and v in {\"zero\", \"sigma_min\"}","tryCatchPattern":null,"preventionTips":["The invalid value survives construction and only fails in set_timesteps — validate configs eagerly.","Use 'zero' only with dpmsolver++/sde-dpmsolver++.","Delete empty/missing keys rather than storing '' when normalising configs."],"tags":["python","diffusion","scheduler","config","sigma"],"backgroundTag":null,"analyzedSha":"94da20d98b2fa7688e9cbfaf7692ddb4954f7600","analyzedAt":"2026-08-15T04:12:07.418Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}