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

Improve LCMScheduler #5681

Merged

Conversation

dg845
Copy link
Contributor

@dg845 dg845 commented Nov 7, 2023

What does this PR do?

This PR makes the following improvements to LCMScheduler:

  1. LCMScheduler.step no longer adds noise to prev_sample on the final timestep of the timestep schedule. This should make LCMScheduler more compatible with pipelines outside of the LCM pipelines.
  2. The timestep scaling factor used when computing the c_skip and c_out boundary scalings in LCMScheduler.get_scalings_for_boundary_condition_discrete is now configurable as LCMScheduler.timestep_scaling.

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.

@patrickvonplaten
@sayakpaul
@luosiallen

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Nov 7, 2023

The documentation is not available anymore as the PR was closed or merged.

@patrickvonplaten patrickvonplaten merged commit aab6de2 into huggingface:main Nov 7, 2023
13 checks passed
kashif pushed a commit to kashif/diffusers that referenced this pull request Nov 11, 2023
* Refactor LCMScheduler.step such that prev_sample == denoised at the last timestep in the schedule.

* Make timestep scaling when calculating boundary conditions configurable.

* Reparameterize timestep_scaling to be a multiplicative rather than division scaling.

* make style

* fix dtype conversion

* make style

---------

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
@dg845 dg845 deleted the lcm-scheduler-step-refactor branch November 14, 2023 03:23
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* Refactor LCMScheduler.step such that prev_sample == denoised at the last timestep in the schedule.

* Make timestep scaling when calculating boundary conditions configurable.

* Reparameterize timestep_scaling to be a multiplicative rather than division scaling.

* make style

* fix dtype conversion

* make style

---------

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
* Refactor LCMScheduler.step such that prev_sample == denoised at the last timestep in the schedule.

* Make timestep scaling when calculating boundary conditions configurable.

* Reparameterize timestep_scaling to be a multiplicative rather than division scaling.

* make style

* fix dtype conversion

* make style

---------

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
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.

None yet

3 participants