stable-diffusion.cpp
stable-diffusion.cpp copied to clipboard
fix: adjust timestep calculations for DDIM and TCD
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.