You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update FlowMatchEulerDiscreteScheduler with new design to support SD3 / SD3.5 / Flux moving forward #10511
Fully support SD3 / SD3.5 / FLUX models using new scheduler design template with a more standardized approach including new parameters to support models. This approach can be utilized in existing schedules to support flow match models.
I have a working FlowMatchEulerDiscreteScheduler schedule in my local library to support this request.
A list of current issues and PR's (and there may be more) may be fully or partially addressed with this request:
Hi @ukaprch. Thanks for your interest in Flow Match scheduling support. A scheduling refactor is in progress: #10146. I've written an overview of the preliminary design below, see #10146 (comment) for more code samples and output examples. I'm working on adding more schedulers and refining the design. There is a lot to consider for the design, we also need to gracefully handle deprecation and minimize downstream effects. We know this is highly anticipated and we appreciate your patience while we work on it 🤗
Scheduling refactor
Motivation
We have limited support for Flow Match as we need separate Flow Match variants
Likewise we have limited support for EDM
Noise schedules like karras, beta are implemented on a per-scheduler basis so there is limited support
Flow Match schedulers have to pass model specific base schedule through sigmas
Design
The new design aims to eliminate variants, improve support coverage and allow easier customization/experimentation.
We accomplish this by:
Identifying schedule types e.g. Beta, Flow Match that group existing code related to each
Beta
Creates a BetaSchedule of type "linear", "scaled_linear" etc. which create Tensors betas, alphas, alphas_cumprod with shape (num_train_timesteps,). timesteps are created according to timestep_spacing of type "linspace", "leading", "trailing", sigmas are created according to interpolation_type of type "linear", "log_linear".
Creates a FlowMatchSchedule which creates Tensor sigmas with shape (num_inference_steps,) according to the base_schedule and applies shifting with shift value or dynamic_shifting with mu value.
Simplifying existing scheduling_* e.g. scheduling_euler_discrete by moving some common code to a Mixin. EulerDiscreteScheduler etc. will work with any schedule type and sigma schedule. The code is mainly related to the sampling method.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
Activity
hlky commentedon Jan 9, 2025
Hi @ukaprch. Thanks for your interest in Flow Match scheduling support. A scheduling refactor is in progress: #10146. I've written an overview of the preliminary design below, see #10146 (comment) for more code samples and output examples. I'm working on adding more schedulers and refining the design. There is a lot to consider for the design, we also need to gracefully handle deprecation and minimize downstream effects. We know this is highly anticipated and we appreciate your patience while we work on it 🤗
Scheduling refactor
Motivation
karras,betaare implemented on a per-scheduler basis so there is limited supportsigmasDesign
The new design aims to eliminate variants, improve support coverage and allow easier customization/experimentation.
We accomplish this by:
schedule typese.g.Beta,Flow Matchthat group existing code related to eachBeta
Creates a
BetaScheduleof type"linear","scaled_linear"etc. which create Tensorsbetas,alphas,alphas_cumprodwith shape(num_train_timesteps,).timestepsare created according totimestep_spacingof type"linspace","leading","trailing",sigmasare created according tointerpolation_typeof type"linear","log_linear".Flow Match
Creates a
FlowMatchSchedulewhich creates Tensorsigmaswith shape(num_inference_steps,)according to thebase_scheduleand applies shifting withshiftvalue ordynamic_shiftingwithmuvalue.Custom
Exponential,Karrasto allow use with anyschedule typeand easy customizabilityKarras
Custom
scheduling_*e.g.scheduling_euler_discreteby moving some common code to aMixin.EulerDiscreteScheduleretc. will work with anyschedule typeandsigma schedule. The code is mainly related to the sampling method.github-actions commentedon Feb 8, 2025
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.