Skip to content
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

[Schedulers] Fix callback steps #5261

Merged
merged 4 commits into from
Oct 2, 2023
Merged

[Schedulers] Fix callback steps #5261

merged 4 commits into from
Oct 2, 2023

Conversation

patrickvonplaten
Copy link
Contributor

@patrickvonplaten patrickvonplaten commented Oct 2, 2023

What does this PR do?

This PR fixes: #5233

As figured out by @bghira, 2nd order schedulers are a bit special. In our case here we need to make sure that the passed callback_idx should account for this. This mass PR was created by running the following find and replace regex:

 find_and_replace "callback(i, t, latents)" "step_idx = i \/\/ getattr\('scheduler', 'order', 1\); callback\(step_idx, t, latents\)"

@bghira
Copy link
Contributor

bghira commented Oct 2, 2023

@patrickvonplaten the test is failing because the order of the elements have changed

@patrickvonplaten
Copy link
Contributor Author

@patrickvonplaten the test is failing because the order of the elements have changed

Yeah, I don't think it's related

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 2, 2023

The documentation is not available anymore as the PR was closed or merged.

@patrickvonplaten patrickvonplaten merged commit bdd1611 into main Oct 2, 2023
@patrickvonplaten patrickvonplaten deleted the fix_callback_steps branch October 2, 2023 17:54
chuzhdontcode pushed a commit to chuzhdontcode/diffusers that referenced this pull request Oct 4, 2023
* fix all

* make fix copies

* make fix copies
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* fix all

* make fix copies

* make fix copies
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
* fix all

* make fix copies

* make fix copies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong step value in parameters sent to callback function
5 participants