Skip to content

Fix wrong param types, docs, and handles noise=None in scale_noise of FlowMatching schedulers #11669

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Promisery
Copy link

@Promisery Promisery commented Jun 6, 2025

What does this PR do?

In the scale_noise functions of all flow matching schedulers, the definitions and docs are wrong:

  • timestep should be a torch.FloatTensor, not a float or int
  • noise is not included in the document

Also, noise should be a required arg

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@yiyixuxu

@DN6 DN6 requested a review from yiyixuxu June 11, 2025 08:38
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.

thanks for the PR
I left one feedback

@@ -212,6 +214,9 @@ def scale_noise(
while len(sigma.shape) < len(sample.shape):
sigma = sigma.unsqueeze(-1)

if noise is None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we noise a required arg instead?
to properly generate noise inside scale_noise we need to pass a generator too, I don't think we need to do that

Copy link
Author

Choose a reason for hiding this comment

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

Agreed

@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.

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.

3 participants