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

Issues with FlowMatchEulerDiscreteScheduler.set_timesteps() #10637

Open
dxqbYD opened this issue Jan 23, 2025 · 3 comments
Open

Issues with FlowMatchEulerDiscreteScheduler.set_timesteps() #10637

dxqbYD opened this issue Jan 23, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@dxqbYD
Copy link

dxqbYD commented Jan 23, 2025

Describe the bug

Why does num_inference_steps have the default None? It's not an Optional. It cannot be None. This leads to weird error messages if you skip this parameter.

sigmas is undocumented:

mu is undocumented, even though it can be a required parameter (depending on configuration):

Reproduction

see above

Logs

System Info

HEAD

Who can help?

@yiyixuxu

@dxqbYD dxqbYD added the bug Something isn't working label Jan 23, 2025
@hlky
Copy link
Collaborator

hlky commented Jan 24, 2025

Why does num_inference_steps have the default None? It's not an Optional. It cannot be None

num_inference_steps is optional, it is None when we pass sigmas.

This leads to weird error messages if you skip this parameter.

What is the error message?

sigmas is undocumented

It appears to be missing from the docstring, sigmas is passed to FlowMatchEulerDiscreteScheduler to accommodate different "base schedules" which tend to be unique in FlowMatch models. The default in FlowMatchEulerDiscreteScheduler, as in, when we pass num_inference_steps is for SD3 as this was added first. Flux, HunyuanVideo, LTX, Mochi all pass their own base schedule from through sigmas to FlowMatchEulerDiscreteScheduler from the pipeline.

mu is undocumented, even though it can be a required parameter

mu is used when use_dynamic_shifting=True, there is a check that mu is not None when use_dynamic_shifting=True.

@dxqbYD
Copy link
Author

dxqbYD commented Jan 24, 2025

error message:

 scheduler.set_timesteps()
  File "...\venv\src\diffusers\src\diffusers\schedulers\scheduling_flow_match_euler_discrete.py", line 257, in set_timesteps
    timesteps = np.linspace(
  File "...\venv\lib\site-packages\numpy\core\function_base.py", line 122, in linspace
    num = operator.index(num)
TypeError: 'NoneType' object cannot be interpreted as an integer

Thank you for your explanations regarding the other parameters, but I meant that they should be documented in the code/docs

@hlky
Copy link
Collaborator

hlky commented Jan 24, 2025

I see. One of the arguments must be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants