stable-diffusion.cpp icon indicating copy to clipboard operation
stable-diffusion.cpp copied to clipboard

fix: adjust timestep calculations for DDIM and TCD

Open wbruna opened this issue 8 months ago • 0 comments

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.

wbruna avatar Apr 24 '25 14:04 wbruna