microsoft/VibeVoice · error · ValueError
{self.config.timestep_spacing} is not supported. Please make
Error message
{self.config.timestep_spacing} is not supported. Please make sure to choose one of 'linspace', 'leading' or 'trailing'. What it means
When `set_timesteps` generates its grid from `num_inference_steps`, the spacing rule comes from `config.timestep_spacing`; this vendored scheduler implements only `linspace`, `leading`, and `trailing`. Any other value raises ValueError at set_timesteps time (not construction), because the constructor never validates it. The default in diffusers-style configs is usually `leading`.
Source
Thrown at vibevoice/schedule/dpm_solver.py:380
.copy()
.astype(np.int64)
)
elif self.config.timestep_spacing == "leading":
step_ratio = last_timestep // (num_inference_steps + 1)
# creates integer timesteps by multiplying by ratio
# casting to int to avoid issues when num_inference_step is power of 3
timesteps = (
(np.arange(0, num_inference_steps + 1) * step_ratio).round()[::-1][:-1].copy().astype(np.int64)
)
timesteps += self.config.steps_offset
elif self.config.timestep_spacing == "trailing":
step_ratio = self.config.num_train_timesteps / num_inference_steps
# creates integer timesteps by multiplying by ratio
# casting to int to avoid issues when num_inference_step is power of 3
timesteps = np.arange(last_timestep, 0, -step_ratio).round().copy().astype(np.int64)
timesteps -= 1
else:
raise ValueError(
f"{self.config.timestep_spacing} is not supported. Please make sure to choose one of 'linspace', 'leading' or 'trailing'."
)
sigmas = np.array(((1 - self.alphas_cumprod) / self.alphas_cumprod) ** 0.5)
log_sigmas = np.log(sigmas)
if self.config.use_karras_sigmas:
sigmas = np.flip(sigmas).copy()
sigmas = self._convert_to_karras(in_sigmas=sigmas, num_inference_steps=num_inference_steps)
timesteps = np.array([self._sigma_to_t(sigma, log_sigmas) for sigma in sigmas]).round()
elif self.config.use_lu_lambdas:
lambdas = np.flip(log_sigmas.copy())
lambdas = self._convert_to_lu(in_lambdas=lambdas, num_inference_steps=num_inference_steps)
sigmas = np.exp(lambdas)
timesteps = np.array([self._sigma_to_t(sigma, log_sigmas) for sigma in sigmas]).round()
else:
sigmas = np.interp(timesteps, np.arange(0, len(sigmas)), sigmas)
View on GitHub (pinned to 94da20d98b)
Solutions
- Set timestep_spacing to "linspace", "leading", or "trailing" in the scheduler constructor/config.
- For diffusion models trained with zero-terminal-SNR, prefer "trailing".
- Validate the value right after loading config, since the constructor will not catch it.
Example fix
# before sched = DPMSolverMultistepScheduler(..., timestep_spacing="euler") sched.set_timesteps(30) # ValueError here # after sched = DPMSolverMultistepScheduler(..., timestep_spacing="trailing") sched.set_timesteps(30)
Defensive patterns
Strategy: validation
Validate before calling
SPACINGS = {"linspace", "leading", "trailing"}
if scheduler.config.timestep_spacing not in SPACINGS:
raise ValueError(
f"timestep_spacing {scheduler.config.timestep_spacing!r} invalid; "
f"choose from {sorted(SPACINGS)}"
)
scheduler.set_timesteps(30) Type guard
def is_supported_timestep_spacing(v) -> bool:
return isinstance(v, str) and v in {"linspace", "leading", "trailing"} Prevention
- Validate timestep_spacing immediately after scheduler construction — the constructor does not check it.
- Configs from other diffusion repos may carry spacing values this copy lacks.
- For zero-terminal-SNR-trained models, standardize on 'trailing'.
When it happens
Trigger: `scheduler.set_timesteps(30)` on a scheduler constructed with `timestep_spacing="linspace_trailing"`, `"trailing" ` with whitespace, or a value from a newer diffusers config not ported here.
Common situations: Configs authored for SDXL-era diffusers (where trailing is recommended) copied into this repo; typo or case error in YAML; model-card JSON carrying an unsupported spacing value.
Related errors
- Cannot use `timesteps` with `config.use_karras_sigmas = True
- Cannot use `timesteps` with `config.use_lu_lambdas = True`
- Unsupported alpha_transform_type: {alpha_transform_type}
- {beta_schedule} is not implemented for {self.__class__}
- {algorithm_type} is not implemented for {self.__class__}
AI-assisted analysis of microsoft/VibeVoice@94da20d98b (2026-08-15).
Data as JSON: /api/errors/d4112326b15b72e1.
Report an issue: GitHub.