Skip to content

denoiser.hpp: simplify DPM++ (2S) Ancestral #667

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 1 commit into
base: master
Choose a base branch
from

Conversation

vmobilis
Copy link
Contributor

@vmobilis vmobilis commented Apr 30, 2025

DPMPP2S_A:

if (sigma_down == 0) {

Current formula:

if (sigma_down == 0) {
    d = (x - denoised) / sigmas[i];
    dt = sigma_down - sigmas[i];
    x += d * dt;
}

Since sigma_down == 0
=> dt == -sigmas[i]
=> d * dt == (x - denoised) / sigmas[i] * (-sigmas[i]) == denoised - x
=> x = x + denoised - x
=> x = denoised


Proof:
BeforeAfter

Images are almost same.
And thank you for the program.

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.

1 participant