diff --git a/diffusers_holder.py b/diffusers_holder.py index 37795d5..d704d81 100644 --- a/diffusers_holder.py +++ b/diffusers_holder.py @@ -696,6 +696,10 @@ class DiffusersHolder(): # 8. Denoising loop for i, t in enumerate(timesteps): + # Write latents out and skip + if i < idx_start: + list_latents_out.append(None) + continue # Set the right starting latents if i == idx_start: latents = latents_start.clone() @@ -705,10 +709,6 @@ class DiffusersHolder(): latents_mixtarget = list_latents_mixing[i - 1].clone() latents = interpolate_spherical(latents, latents_mixtarget, list_mixing_coeffs[i]) - # Write latents out and skip - if i < idx_start: - list_latents_out.append(latents) - continue # expand the latents if we are doing classifier free guidance latent_model_input = torch.cat([latents] * 2)# if do_classifier_free_guidance else latents