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

update get_order_list if statement #7309

Merged

Conversation

kghamilton89
Copy link
Contributor

Resolves #5705 by adding additional checks on number of order parameters according to @vladmandic recommendation here.

Additionally follows directive from @patrickvonplaten here and raises valueError if order > 3.

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey thanks for the PR!
I left a question

@@ -239,7 +241,7 @@ def get_order_list(self, num_inference_steps: int) -> List[int]:
elif order == 1:
orders = [1] * steps
else:
if order == 3:
if order >= 3:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this change needed here?
if order > 3, we will already throw an error so it is not possible to have order > 3 here, no?

Copy link
Contributor Author

@kghamilton89 kghamilton89 Mar 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. Leaving conversation open for maintainers if needed but this has been actioned ⚡

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@yiyixuxu yiyixuxu merged commit 0b45b58 into huggingface:main Mar 14, 2024
15 checks passed
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.

Issue: Error handling of invalid orders
3 participants