-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix scheduler inference steps error with power of 3 #466
Conversation
The documentation is not available anymore as the PR was closed or merged. |
Cool that looks good to me! Thanks a lot for the fix. @natolambert could you also add one test that shows that it can now be a power of three? |
Okay @patrickvonplaten, so this test should cover the test needed for now. If we update NOTE: I added a small fix where the |
We need to verify this in the Flax implementation too; it probably happens there as well: https://github.com/patil-suraj/stable-diffusion-jax/blob/main/stable_diffusion_jax/scheduling_pndm.py#L103-L105 /cc @kashif |
PR looks great to me! |
I'll add a comment on the test explaining why it is there, then merge (otherwise it may be a little confusing to a reader). Great! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but there might be a case where we need to .round()
for mathematical correctness, instead of just truncating the decimal with .astype(int)
. So watch out for those issues :)
@anton-l that's a good point. I'm going to check with round, I like that better (it's also less opaque). |
* [WEB] CSS changes to the web-ui (huggingface#465) This commit updates UI with styling. Signed-Off-by: Gaurav Shukla <[email protected]> Signed-off-by: Gaurav Shukla <[email protected]> * [WEB] Update the title (huggingface#466) * [WEB] Add support for long prompts (huggingface#467) * [WEB] fix background color Signed-Off-by: Gaurav Shukla * [WEB] Remove long prompts support It removes support to long prompts due to higher lag in loading long prompts. Signed-Off-by: Gaurav Shukla <gaurav@nod-labs> * [WEB] Update nod logo and enable debug feature. Signed-Off-by: Gaurav Shukla <[email protected]> Signed-off-by: Gaurav Shukla <[email protected]> Signed-off-by: Gaurav Shukla Signed-off-by: Gaurav Shukla <gaurav@nod-labs>
* initial attempt at solving * fix pndm power of 3 inference_step * add power of 3 test * fix index in pndm test, remove ddim test * add comments, change to round()
Discussing in #444.
More verification to do on the unclear number of iterations vs
num_inference_steps
Solution inspired by this discussion in original SD repo, thanks @ryanirl.