lllyasviel/ControlNet · error · ValueError
Unsupported skip_type {}, need to be 'logSNR' or 'time_unifo
Error message
Unsupported skip_type {}, need to be 'logSNR' or 'time_uniform' or 'time_quadratic' What it means
DPM-Solver's get_time_steps distributes N sampling timesteps according to skip_type: 'logSNR', 'time_uniform', or 'time_quadratic'. An unrecognized skip_type string raises this ValueError during sample() or when computing orders/timesteps for the singlestep solver.
Source
Thrown at ldm/models/diffusion/dpm_solver/dpm_solver.py:402
t_0: A `float`. The ending time of the sampling (default is epsilon).
N: A `int`. The total number of the spacing of the time steps.
device: A torch device.
Returns:
A pytorch tensor of the time steps, with the shape (N + 1,).
"""
if skip_type == 'logSNR':
lambda_T = self.noise_schedule.marginal_lambda(torch.tensor(t_T).to(device))
lambda_0 = self.noise_schedule.marginal_lambda(torch.tensor(t_0).to(device))
logSNR_steps = torch.linspace(lambda_T.cpu().item(), lambda_0.cpu().item(), N + 1).to(device)
return self.noise_schedule.inverse_lambda(logSNR_steps)
elif skip_type == 'time_uniform':
return torch.linspace(t_T, t_0, N + 1).to(device)
elif skip_type == 'time_quadratic':
t_order = 2
t = torch.linspace(t_T ** (1. / t_order), t_0 ** (1. / t_order), N + 1).pow(t_order).to(device)
return t
else:
raise ValueError(
"Unsupported skip_type {}, need to be 'logSNR' or 'time_uniform' or 'time_quadratic'".format(skip_type))
def get_orders_and_timesteps_for_singlestep_solver(self, steps, order, skip_type, t_T, t_0, device):
"""
Get the order of each step for sampling by the singlestep DPM-Solver.
We combine both DPM-Solver-1,2,3 to use all the function evaluations, which is named as "DPM-Solver-fast".
Given a fixed number of function evaluations by `steps`, the sampling procedure by DPM-Solver-fast is:
- If order == 1:
We take `steps` of DPM-Solver-1 (i.e. DDIM).
- If order == 2:
- Denote K = (steps // 2). We take K or (K + 1) intermediate time steps for sampling.
- If steps % 2 == 0, we use K steps of DPM-Solver-2.
- If steps % 2 == 1, we use K steps of DPM-Solver-2 and 1 step of DPM-Solver-1.
- If order == 3:
- Denote K = (steps // 3 + 1). We take K intermediate time steps for sampling.
- If steps % 3 == 0, we use (K - 2) steps of DPM-Solver-3, and 1 step of DPM-Solver-2 and 1 step of DPM-Solver-1.
- If steps % 3 == 1, we use (K - 1) steps of DPM-Solver-3 and 1 step of DPM-Solver-1.
- If steps % 3 == 2, we use (K - 1) steps of DPM-Solver-3 and 1 step of DPM-Solver-2.View on GitHub (pinned to ed85cd1e25)
Solutions
- Use 'logSNR', 'time_uniform', or 'time_quadratic' exactly
- Prefer 'logSNR' to reproduce DPM-Solver paper results
- Validate skip_type in your sampling wrapper before calling sample
Example fix
# before dpm.sample(..., skip_type='time-uniform') # after dpm.sample(..., skip_type='time_uniform')
Defensive patterns
Strategy: validation
Validate before calling
assert skip_type in ('logSNR', 'time_uniform', 'time_quadratic'), f"unsupported skip_type {skip_type!r}" Type guard
def is_valid_skip_type(s: str) -> bool:
return s in ('logSNR', 'time_uniform', 'time_quadratic') Prevention
- Whitelist sampler options in your config loader
- Prefer defaults ('logSNR') unless you know why you need another spacing
When it happens
Trigger: Calling DPM_Solver.sample(..., skip_type='uniform') or any string not in the allowed set; also triggered indirectly by get_orders_and_timesteps_for_singlestep_solver.
Common situations: Sampler UIs exposing custom skip-type names; migrating configs from DPM-Solver++ where names differ; typos like 'time-uniform'.
Related errors
- Unsupported noise schedule {}. The schedule needs to be 'dis
- 'order' must be '1' or '2' or '3'.
- 'solver_type' must be either 'dpm_solver' or 'taylor', got {
- Solver order must be 1 or 2 or 3, got {}
- resize_method {self.__resize_method} not implemented
AI-assisted analysis of lllyasviel/ControlNet@ed85cd1e25 (2026-08-27).
Data as JSON: /api/errors/eb97d8a25444388a.
Report an issue: GitHub.