-
Notifications
You must be signed in to change notification settings - Fork 6.1k
flow matching lcm scheduler #11170
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
flow matching lcm scheduler #11170
Conversation
* stochastic sampling * upscaling for scale-wise generation
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. |
@bot /style |
Style fixes have been applied. View the workflow run here. |
thanks @quickjkee |
thanks for the question and reviewing @yiyixuxu! |
@quickjkee |
Thank you for your great contribution! Is there any plan to merge this pr? Our HiDream-I1 |
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.
Hi @quickjkee. Left a few suggestions on unused parameters but LGTM, thanks!
Co-authored-by: hlky <hlky@hlky.ac>
Why?
Most cutting-edge image generative models (SD3.5,
FLUX) are formulated using flow matching. Moreover, some state-of-the-art distillation methods (DMD2, CD) use stochastic multistep sampling (LCM scheduler). However, there is no realization of the LCM scheduler for the flow matching formulation.
What does this PR do?
Thus, this PR provides a
scheduling_flow_match_lcm.py
that is in the same spirit as the scheduling_lcm.py. The goal is for distilled models (using, e.g SD3.5 or FLUX) to use this sampler.Moreover, as an additional tool, this PR provides the ability to generate on different resolution scales.
Which could significantly accelerate the generation process. This concept was introduced in SwD.
How it works?
For example, one of the most prominent distillation approaches, DMD2, uses LCM. It is distilled from SDXL. But there is also an implementation for SD3.5 Large and with PR it works as follows:
To generate in a scale-wise regime, it is necessary to provide scale factors through the
pipe.scheduler.set_scale_factors
.This modification is optional.