Skip to content

fix: adjust timestep calculations for DDIM and TCD #665

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wbruna
Copy link

@wbruna wbruna commented Apr 24, 2025

On img2img, the number of steps correspond to the last precalculated sigma values, but the internal alphas_cumprod and compvis_sigmas were being computed over the entire step range.

Also, tweaks the prev_timestep calculation on DDIM to better match the current timestamp (like on TCD), to avoid inconsistencies due to rounding.

This partially fixes #663 , and seems enough to at least generate coherent images. But low strength generations still produce noisy outputs.

On img2img, the number of steps correspond to the last precalculated sigma
values, but the internal alphas_cumprod and compvis_sigmas were being computed
over the entire step range.

Also, tweaks the prev_timestep calculation on DDIM to better match the current
timestamp (like on TCD), to avoid inconsistencies due to rounding.
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.

img2img not working with DDIM trailing or TCD
1 participant