{"record":{"id":"eb97d8a25444388a","repo":"lllyasviel/ControlNet","slug":"unsupported-skip-type-need-to-be-logsnr-or","errorCode":null,"errorMessage":"Unsupported skip_type {}, need to be 'logSNR' or 'time_uniform' or 'time_quadratic'","messagePattern":"Unsupported skip_type (.+?), need to be 'logSNR' or 'time_uniform' or 'time_quadratic'","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"ldm/models/diffusion/dpm_solver/dpm_solver.py","lineNumber":402,"sourceCode":"            t_0: A `float`. The ending time of the sampling (default is epsilon).\n            N: A `int`. The total number of the spacing of the time steps.\n            device: A torch device.\n        Returns:\n            A pytorch tensor of the time steps, with the shape (N + 1,).\n        \"\"\"\n        if skip_type == 'logSNR':\n            lambda_T = self.noise_schedule.marginal_lambda(torch.tensor(t_T).to(device))\n            lambda_0 = self.noise_schedule.marginal_lambda(torch.tensor(t_0).to(device))\n            logSNR_steps = torch.linspace(lambda_T.cpu().item(), lambda_0.cpu().item(), N + 1).to(device)\n            return self.noise_schedule.inverse_lambda(logSNR_steps)\n        elif skip_type == 'time_uniform':\n            return torch.linspace(t_T, t_0, N + 1).to(device)\n        elif skip_type == 'time_quadratic':\n            t_order = 2\n            t = torch.linspace(t_T ** (1. / t_order), t_0 ** (1. / t_order), N + 1).pow(t_order).to(device)\n            return t\n        else:\n            raise ValueError(\n                \"Unsupported skip_type {}, need to be 'logSNR' or 'time_uniform' or 'time_quadratic'\".format(skip_type))\n\n    def get_orders_and_timesteps_for_singlestep_solver(self, steps, order, skip_type, t_T, t_0, device):\n        \"\"\"\n        Get the order of each step for sampling by the singlestep DPM-Solver.\n        We combine both DPM-Solver-1,2,3 to use all the function evaluations, which is named as \"DPM-Solver-fast\".\n        Given a fixed number of function evaluations by `steps`, the sampling procedure by DPM-Solver-fast is:\n            - If order == 1:\n                We take `steps` of DPM-Solver-1 (i.e. DDIM).\n            - If order == 2:\n                - Denote K = (steps // 2). We take K or (K + 1) intermediate time steps for sampling.\n                - If steps % 2 == 0, we use K steps of DPM-Solver-2.\n                - If steps % 2 == 1, we use K steps of DPM-Solver-2 and 1 step of DPM-Solver-1.\n            - If order == 3:\n                - Denote K = (steps // 3 + 1). We take K intermediate time steps for sampling.\n                - 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.\n                - If steps % 3 == 1, we use (K - 1) steps of DPM-Solver-3 and 1 step of DPM-Solver-1.\n                - If steps % 3 == 2, we use (K - 1) steps of DPM-Solver-3 and 1 step of DPM-Solver-2.","sourceCodeStart":384,"sourceCodeEnd":420,"githubUrl":"https://github.com/lllyasviel/ControlNet/blob/ed85cd1e25a5ed592f7d8178495b4483de0331bf/ldm/models/diffusion/dpm_solver/dpm_solver.py#L384-L420","documentation":"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.","triggerScenarios":"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.","commonSituations":"Sampler UIs exposing custom skip-type names; migrating configs from DPM-Solver++ where names differ; typos like 'time-uniform'.","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"],"exampleFix":"# before\ndpm.sample(..., skip_type='time-uniform')\n# after\ndpm.sample(..., skip_type='time_uniform')","handlingStrategy":"validation","validationCode":"assert skip_type in ('logSNR', 'time_uniform', 'time_quadratic'), f\"unsupported skip_type {skip_type!r}\"","typeGuard":"def is_valid_skip_type(s: str) -> bool:\n    return s in ('logSNR', 'time_uniform', 'time_quadratic')","tryCatchPattern":null,"preventionTips":["Whitelist sampler options in your config loader","Prefer defaults ('logSNR') unless you know why you need another spacing"],"tags":["dpm-solver","sampling","timesteps","config"],"backgroundTag":"unsupported-config-option","analyzedSha":"ed85cd1e25a5ed592f7d8178495b4483de0331bf","analyzedAt":"2026-08-27T12:58:54.167Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}