def METHOD_NAME(self, p, steps):
    discard_next_to_last_sigma = self.config is not None and self.config.options.get('discard_next_to_last_sigma', False)
    if opts.always_discard_next_to_last_sigma and not discard_next_to_last_sigma:
        discard_next_to_last_sigma = True
        p.extra_generation_params["Discard penultimate sigma"] = True
    steps += 1 if discard_next_to_last_sigma else 0
    timesteps = torch.clip(torch.asarray(list(range(0, 1000, 1000 // steps)), device=devices.device) + 1, 0, 999)
    return timesteps