Update pipeline.py
Browse files- pipeline.py +3 -3
pipeline.py
CHANGED
@@ -1528,10 +1528,10 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
|
|
1528 |
torch.cuda.synchronize() # Synchronize GPU before batch addition
|
1529 |
time_batch_addition_start = time.time()
|
1530 |
|
1531 |
-
for
|
1532 |
# Perform batch addition
|
1533 |
-
noise_pred_uncond_sum[..., context_index, :, :] += noise_pred_uncond[:, :,
|
1534 |
-
noise_pred_text_sum[..., context_index, :, :] += noise_pred_text[:, :,
|
1535 |
|
1536 |
# Batch increment for latent_counter
|
1537 |
latent_counter[context_index] += 1
|
|
|
1528 |
torch.cuda.synchronize() # Synchronize GPU before batch addition
|
1529 |
time_batch_addition_start = time.time()
|
1530 |
|
1531 |
+
for z, context_index in enumerate(current_context_indexes):
|
1532 |
# Perform batch addition
|
1533 |
+
noise_pred_uncond_sum[..., context_index, :, :] += noise_pred_uncond[:, :, z, :, :]
|
1534 |
+
noise_pred_text_sum[..., context_index, :, :] += noise_pred_text[:, :, z, :, :]
|
1535 |
|
1536 |
# Batch increment for latent_counter
|
1537 |
latent_counter[context_index] += 1
|