{"record":{"id":"0b652b553bbc0871","repo":"microsoft/VibeVoice","slug":"prediction-type-given-as-self-config-prediction-t","errorCode":null,"errorMessage":"prediction_type given as {self.config.prediction_type} must be one of `epsilon`, `sample`, or `v_prediction` for the DPMSolverMultistepScheduler.","messagePattern":"prediction_type given as (.+?) must be one of `epsilon`, `sample`, or `v_prediction` for the DPMSolverMultistepScheduler\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vibevoice/schedule/dpm_solver.py","lineNumber":586,"sourceCode":"            )\n\n        # DPM-Solver++ needs to solve an integral of the data prediction model.\n        if self.config.algorithm_type in [\"dpmsolver++\", \"sde-dpmsolver++\"]:\n            if self.config.prediction_type == \"epsilon\":\n                # DPM-Solver and DPM-Solver++ only need the \"mean\" output.\n                if self.config.variance_type in [\"learned\", \"learned_range\"]:\n                    model_output = model_output[:, :3]\n                sigma = self.sigmas[self.step_index]\n                alpha_t, sigma_t = self._sigma_to_alpha_sigma_t(sigma)\n                x0_pred = (sample - sigma_t * model_output) / alpha_t\n            elif self.config.prediction_type == \"sample\":\n                x0_pred = model_output\n            elif self.config.prediction_type == \"v_prediction\":\n                sigma = self.sigmas[self.step_index]\n                alpha_t, sigma_t = self._sigma_to_alpha_sigma_t(sigma)\n                x0_pred = alpha_t * sample - sigma_t * model_output\n            else:\n                raise ValueError(\n                    f\"prediction_type given as {self.config.prediction_type} must be one of `epsilon`, `sample`, or\"\n                    \" `v_prediction` for the DPMSolverMultistepScheduler.\"\n                )\n\n            if self.config.thresholding:\n                x0_pred = self._threshold_sample(x0_pred)\n\n            return x0_pred\n\n        # DPM-Solver needs to solve an integral of the noise prediction model.\n        elif self.config.algorithm_type in [\"dpmsolver\", \"sde-dpmsolver\"]:\n            if self.config.prediction_type == \"epsilon\":\n                # DPM-Solver and DPM-Solver++ only need the \"mean\" output.\n                if self.config.variance_type in [\"learned\", \"learned_range\"]:\n                    epsilon = model_output[:, :3]\n                else:\n                    epsilon = model_output\n            elif self.config.prediction_type == \"sample\":","sourceCodeStart":568,"sourceCodeEnd":604,"githubUrl":"https://github.com/microsoft/VibeVoice/blob/94da20d98b2fa7688e9cbfaf7692ddb4954f7600/vibevoice/schedule/dpm_solver.py#L568-L604","documentation":"Under DPM-Solver++ (`algorithm_type` in {dpmsolver++, sde-dpmsolver++}) the model output is converted to an x0 prediction, and the conversion formula depends on `config.prediction_type`. This scheduler implements `epsilon`, `sample`, and `v_prediction`; anything else raises ValueError during `step()` (via `_convert_model_output`). prediction_type must match how the underlying diffusion model was trained.","triggerScenarios":"Loading a scheduler config with `prediction_type=\"v\"` or `\"epsilon_v\"` (some repos use short names), or a flow-matching model (`prediction_type=\"flow_prediction\"`) sampled with this scheduler, then calling `scheduler.step()`.","commonSituations":"Mismatched model/scheduler checkpoints (e.g. trying to sample a rectified-flow or v-parameterised checkpoint with DPM-Solver settings from an epsilon model); config hand-edits; short-name conventions from other codebases.","solutions":["Set prediction_type to \"epsilon\" (standard noise prediction), \"sample\" (direct x0), or \"v_prediction\".","Match it to the model's training objective — if the checkpoint is flow-matching, this scheduler family is the wrong choice; use a flow-matching/Euler scheduler.","Check the original model card / training config for the parameterisation before overriding."],"exampleFix":"# before\nsched = DPMSolverMultistepScheduler(..., prediction_type=\"v\")\n\n# after\nsched = DPMSolverMultistepScheduler(..., prediction_type=\"v_prediction\")","handlingStrategy":"validation","validationCode":"PT = {\"epsilon\", \"sample\", \"v_prediction\"}\nassert scheduler.config.prediction_type in PT, (\n    f\"prediction_type {scheduler.config.prediction_type!r} unsupported; \"\n    f\"match the model's training objective ({sorted(PT)})\"\n)","typeGuard":"def is_supported_prediction_type(v) -> bool:\n    return isinstance(v, str) and v in {\"epsilon\", \"sample\", \"v_prediction\"}","tryCatchPattern":null,"preventionTips":["Set prediction_type from the checkpoint's training config, never by guesswork.","No flow-matching support here — flow checkpoints need a flow-matching scheduler.","Use the full spelling 'v_prediction', not 'v'."],"tags":["python","diffusion","scheduler","config","prediction-type"],"backgroundTag":null,"analyzedSha":"94da20d98b2fa7688e9cbfaf7692ddb4954f7600","analyzedAt":"2026-08-15T04:12:07.418Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}