diff --git a/src/refiners/foundationals/latent_diffusion/schedulers/ddpm.py b/src/refiners/foundationals/latent_diffusion/schedulers/ddpm.py index 528d395..db004fa 100644 --- a/src/refiners/foundationals/latent_diffusion/schedulers/ddpm.py +++ b/src/refiners/foundationals/latent_diffusion/schedulers/ddpm.py @@ -56,9 +56,7 @@ class DDPM(Scheduler): else tensor(1, device=self.device) ) current_factor = current_cumulative_factor / previous_cumulative_scale_factor - estimated_denoised_data = ( - x - (1 - current_cumulative_factor) ** 0.5 * noise - ) / current_cumulative_factor**0.5 + estimated_denoised_data = (x - (1 - current_cumulative_factor) ** 0.5 * noise) / current_cumulative_factor**0.5 estimated_denoised_data = estimated_denoised_data.clamp(-1, 1) original_data_coeff = (previous_cumulative_scale_factor**0.5 * (1 - current_factor)) / ( 1 - current_cumulative_factor