smoothieAI commited on
Commit
e5616d3
·
verified ·
1 Parent(s): 1df3d38

Update pipeline.py

Browse files
Files changed (1) hide show
  1. 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 i, context_index in enumerate(current_context_indexes):
1532
  # Perform batch addition
1533
- noise_pred_uncond_sum[..., context_index, :, :] += noise_pred_uncond[:, :, i, :, :]
1534
- noise_pred_text_sum[..., context_index, :, :] += noise_pred_text[:, :, i, :, :]
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