{"record":{"id":"9f35511f3191808e","repo":"microsoft/VibeVoice","slug":"unsupported-alpha-transform-type-alpha-transform","errorCode":null,"errorMessage":"Unsupported alpha_transform_type: {alpha_transform_type}","messagePattern":"Unsupported alpha_transform_type: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vibevoice/schedule/dpm_solver.py","lineNumber":76,"sourceCode":"\n        def alpha_bar_fn(t):\n            return math.exp(t * -12.0)\n\n    elif alpha_transform_type == \"cauchy\":\n        # µ + γ tan (π (0.5 - x))  γ = 1, µ = 3\n        # alpha^2 = 1-1/(exp(λ)+1)\n        def alpha_bar_fn(t, gamma=1, mu=3):\n            snr = mu + gamma * math.tan(math.pi * (0.5 - t) * 0.9)\n            return 1 - 1 / (math.exp(snr) + 1.1)\n\n    elif alpha_transform_type == \"laplace\":\n        # µ − bsgn(0.5 − t) log(1 − 2|t − 0.5|) µ = 0, b = 1\n        def alpha_bar_fn(t, mu=0, b=1):\n            snr = mu - b * math.copysign(1, 0.5 - t) * math.log(1 - 2 * abs(t - 0.5) * 0.98)\n            return 1 - 1 / (math.exp(snr) + 1.02)\n\n    else:\n        raise ValueError(f\"Unsupported alpha_transform_type: {alpha_transform_type}\")\n\n    betas = []\n    for i in range(num_diffusion_timesteps):\n        t1 = i / num_diffusion_timesteps\n        t2 = (i + 1) / num_diffusion_timesteps\n        betas.append(min(1 - alpha_bar_fn(t2) / alpha_bar_fn(t1), max_beta))\n    return torch.tensor(betas, dtype=torch.float32)\n\n\n# Copied from diffusers.schedulers.scheduling_ddim.rescale_zero_terminal_snr\ndef rescale_zero_terminal_snr(betas):\n    \"\"\"\n    Rescales betas to have zero terminal SNR Based on https://arxiv.org/pdf/2305.08891.pdf (Algorithm 1)\n\n\n    Args:\n        betas (`torch.Tensor`):\n            the betas that the scheduler is being initialized with.","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/microsoft/VibeVoice/blob/94da20d98b2fa7688e9cbfaf7692ddb4954f7600/vibevoice/schedule/dpm_solver.py#L58-L94","documentation":"`betas_for_alpha_bar()` is a helper that builds a noise schedule from a parametric alpha_bar function; this copy supports only `cosine`, `exp`, `cauchy`, and `laplace` transform types (dpm_solver.py:51-73). An unknown string raises ValueError immediately. Upstream diffusers supports the same set plus historically `bspline`, so code ported from other schedulers can pass an unsupported name.","triggerScenarios":"Calling `betas_for_alpha_bar(N, alpha_transform_type=\"bspline\")` or any string outside {cosine, exp, cauchy, laplace}; indirectly via a scheduler constructor only if beta_schedule maps there (the scheduler itself routes cosine/cauchy/laplace, so this is almost always a direct helper call).","commonSituations":"Porting schedule code from other diffusion repos (some use `bspline` or custom names), typos like `cosine2`/`Cosine` (case-sensitive), or copying config YAML from a model trained with a different scheduler family.","solutions":["Use one of the supported values: \"cosine\", \"exp\", \"cauchy\", or \"laplace\" (all lowercase).","If you ported the call from diffusers expecting `bspline`, reimplement it locally: define your own alpha_bar_fn and compute betas with the same min(1 - fn(t2)/fn(t1), max_beta) loop.","Check for typos/case in scheduler config values loaded from YAML/JSON."],"exampleFix":"# before\nbetas = betas_for_alpha_bar(1000, alpha_transform_type=\"bspline\")\n\n# after\nbetas = betas_for_alpha_bar(1000, alpha_transform_type=\"cosine\")","handlingStrategy":"validation","validationCode":"SUPPORTED = {\"cosine\", \"exp\", \"cauchy\", \"laplace\"}\nassert alpha_transform_type in SUPPORTED, (\n    f\"alpha_transform_type must be one of {sorted(SUPPORTED)}, got {alpha_transform_type!r}\"\n)\nbetas = betas_for_alpha_bar(1000, alpha_transform_type=alpha_transform_type)","typeGuard":"def is_valid_alpha_transform(v) -> bool:\n    return isinstance(v, str) and v in {\"cosine\", \"exp\", \"cauchy\", \"laplace\"}","tryCatchPattern":null,"preventionTips":["Keep schedule names as module-level constants instead of free-form strings.","This vendored helper does not support diffusers' 'bspline' — check before porting config.","Values are case-sensitive; normalize to lowercase when loading from user files."],"tags":["python","diffusion","scheduler","config","noise-schedule"],"backgroundTag":null,"analyzedSha":"94da20d98b2fa7688e9cbfaf7692ddb4954f7600","analyzedAt":"2026-08-15T04:12:07.418Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}