alle guten dinge sind drei

This commit is contained in:
Johannes Stelzer 2024-01-08 16:10:59 +01:00
parent e16862571d
commit 895af63be1
1 changed files with 6 additions and 4 deletions

View File

@ -576,16 +576,18 @@ class DiffusersHolder():
for i, t in enumerate(timesteps):
# Set the right starting latents
if i < idx_start:
list_latents_out.append(None)
continue
elif i == idx_start:
if i == idx_start:
latents = latents_start.clone()
# Mix latents for crossfeeding
if i > 0 and list_mixing_coeffs[i] > 0:
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(None)
continue
# expand the latents if we are doing classifier free guidance
latent_model_input = torch.cat([latents] * 2) if self.pipe.do_classifier_free_guidance else latents