microsoft/VibeVoice · error · ValueError
Unsupported alpha_transform_type: {alpha_transform_type}
Error message
Unsupported alpha_transform_type: {alpha_transform_type} What it means
`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.
Source
Thrown at vibevoice/schedule/dpm_solver.py:76
def alpha_bar_fn(t):
return math.exp(t * -12.0)
elif alpha_transform_type == "cauchy":
# µ + γ tan (π (0.5 - x)) γ = 1, µ = 3
# alpha^2 = 1-1/(exp(λ)+1)
def alpha_bar_fn(t, gamma=1, mu=3):
snr = mu + gamma * math.tan(math.pi * (0.5 - t) * 0.9)
return 1 - 1 / (math.exp(snr) + 1.1)
elif alpha_transform_type == "laplace":
# µ − bsgn(0.5 − t) log(1 − 2|t − 0.5|) µ = 0, b = 1
def alpha_bar_fn(t, mu=0, b=1):
snr = mu - b * math.copysign(1, 0.5 - t) * math.log(1 - 2 * abs(t - 0.5) * 0.98)
return 1 - 1 / (math.exp(snr) + 1.02)
else:
raise ValueError(f"Unsupported alpha_transform_type: {alpha_transform_type}")
betas = []
for i in range(num_diffusion_timesteps):
t1 = i / num_diffusion_timesteps
t2 = (i + 1) / num_diffusion_timesteps
betas.append(min(1 - alpha_bar_fn(t2) / alpha_bar_fn(t1), max_beta))
return torch.tensor(betas, dtype=torch.float32)
# Copied from diffusers.schedulers.scheduling_ddim.rescale_zero_terminal_snr
def rescale_zero_terminal_snr(betas):
"""
Rescales betas to have zero terminal SNR Based on https://arxiv.org/pdf/2305.08891.pdf (Algorithm 1)
Args:
betas (`torch.Tensor`):
the betas that the scheduler is being initialized with.View on GitHub (pinned to 94da20d98b)
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.
Example fix
# before betas = betas_for_alpha_bar(1000, alpha_transform_type="bspline") # after betas = betas_for_alpha_bar(1000, alpha_transform_type="cosine")
Defensive patterns
Strategy: validation
Validate before calling
SUPPORTED = {"cosine", "exp", "cauchy", "laplace"}
assert alpha_transform_type in SUPPORTED, (
f"alpha_transform_type must be one of {sorted(SUPPORTED)}, got {alpha_transform_type!r}"
)
betas = betas_for_alpha_bar(1000, alpha_transform_type=alpha_transform_type) Type guard
def is_valid_alpha_transform(v) -> bool:
return isinstance(v, str) and v in {"cosine", "exp", "cauchy", "laplace"} Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- {beta_schedule} is not implemented for {self.__class__}
- {algorithm_type} is not implemented for {self.__class__}
- {solver_type} is not implemented for {self.__class__}
- `final_sigmas_type` {final_sigmas_type} is not supported for
- Cannot use `timesteps` with `config.use_karras_sigmas = True
AI-assisted analysis of microsoft/VibeVoice@94da20d98b (2026-08-15).
Data as JSON: /api/errors/9f35511f3191808e.
Report an issue: GitHub.