You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DPMSolverMultistepScheduler out-of-bounds error when using beta_schedule="squaredcos_cap_v2" + use_karras_sigmas=True #12771
Hi, I might be misunderstanding something here — I’m not very experienced with submitting issues to Diffusers yet, so please feel free to correct me if I’ve overlooked anything.
When using DPMSolverMultistepScheduler with the combination:
calling set_timesteps(20) produces duplicate timesteps, which causes the multistep solver’s internal index tracking to drift, eventually leading to an index out of bounds error during sampling.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
Do you have an actual use case for squaredcos_cap_v2 + use_karras_sigmas? I'm not entirely sure why squaredcos_cap_v2 was excluded from rounding in the scheduler code. I can dig into the git commits history, but any change here would require extensive testing from our end, so I want to make sure there's a real use case first.
Thanks!
Do you have an actual use case for squaredcos_cap_v2 + use_karras_sigmas? I'm not entirely sure why squaredcos_cap_v2 was excluded from rounding in the scheduler code. I can dig into the git commits history, but any change here would require extensive testing from our end, so I want to make sure there's a real use case first. Thanks!
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
@yiyixuxu on the use-case question: kandinsky-community/kandinsky-3 ships DDPMScheduler with beta_schedule="squaredcos_cap_v2", so swapping in a faster solver the usual way, X.from_config(pipe.scheduler.config, use_karras_sigmas=True), hits this.
It isn't limited to DPMSolverMultistepScheduler. With that config and 25 steps on current main:
Scheduler
Duplicated timesteps
Result
DPMSolverMultistep
11
IndexError: index 26 is out of bounds
UniPCMultistep
10
AssertionError
DEISMultistep
10
IndexError: index 26 is out of bounds
DPMSolverSinglestep
10
IndexError: list index out of range
SASolver
10
AssertionError
In each case the Karras sigmas map to near-identical timesteps at the top of the cosine schedule, and the step index drifts past the end. #13240 only touches DPMSolverMultistepScheduler.
Would you take a fix that covers all five, with a test running each of them on the cosine + Karras config? Happy to put it together if that's the direction you want.
Found while property-testing the schedulers; prepared with AI assistance, reproduced and checked by me.
Activity
Fix scheduler index out of bounds error with Karras sigmas
github-actions commentedon Jan 9, 2026
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
yiyixuxu commentedon Jan 10, 2026
hey @scp3125
Do you have an actual use case for squaredcos_cap_v2 + use_karras_sigmas? I'm not entirely sure why squaredcos_cap_v2 was excluded from rounding in the scheduler code. I can dig into the git commits history, but any change here would require extensive testing from our end, so I want to make sure there's a real use case first.
Thanks!
dylanzhao25 commentedon Jan 11, 2026
Yes, this is a real inference use case.
Output:
Version:
github-actions commentedon Feb 4, 2026
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
fix: deduplicate timesteps in DPMSolverMultistepScheduler to prevent …
fix: deduplicate timesteps in DPMSolverMultistep for squaredcos_cap_v…
xThreeh commentedon Oct 7, 2026
@yiyixuxu on the use-case question:
kandinsky-community/kandinsky-3shipsDDPMSchedulerwithbeta_schedule="squaredcos_cap_v2", so swapping in a faster solver the usual way,X.from_config(pipe.scheduler.config, use_karras_sigmas=True), hits this.It isn't limited to
DPMSolverMultistepScheduler. With that config and 25 steps on currentmain:IndexError: index 26 is out of boundsAssertionErrorIndexError: index 26 is out of boundsIndexError: list index out of rangeAssertionErrorIn each case the Karras sigmas map to near-identical timesteps at the top of the cosine schedule, and the step index drifts past the end. #13240 only touches
DPMSolverMultistepScheduler.Would you take a fix that covers all five, with a test running each of them on the cosine + Karras config? Happy to put it together if that's the direction you want.
Found while property-testing the schedulers; prepared with AI assistance, reproduced and checked by me.