UniPC remove order
short-circuit for solve(R, b)
#11612
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When unifying skrample's UniP and UniC solvers I noticed the rks matrix solve short circuits when it likely shouldn't.
I think it's because it appends to RKS
diffusers/src/diffusers/schedulers/scheduling_unipc_multistep.py
Line 853 in b5c2050
but only checks by order
diffusers/src/diffusers/schedulers/scheduling_unipc_multistep.py
Lines 886 to 890 in b5c2050
Reading the paper https://arxiv.org/abs/2302.04867 I don't see any 0.5 short circuits so I'm assuming this was added to stop a 1x1 solve from erring. The comments would imply the results should be equivalent, however because you're skipping actual 2x2 solves the results are quite different for high orders
main
beinsezii/unipc_matrix_solve
cc @yiyixuxu
I'm not a mathematician so it might be prudent to double-check the paper yourself to make sure my homework is correct.