smoothieAI commited on
Commit
c5385e2
·
verified ·
1 Parent(s): e89d2cd

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +3 -6
pipeline.py CHANGED
@@ -1527,13 +1527,10 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
1527
  # Timing for batch addition and latent counter increment
1528
  torch.cuda.synchronize() # Synchronize GPU before batch addition
1529
  time_batch_addition_start = time.time()
1530
-
1531
- current_context_tensor = torch.tensor(current_context_indexes, device=latent_counter.device)
1532
  # Perform batch addition
1533
- noise_pred_uncond_sum[..., current_context_tensor, :, :] += noise_pred_uncond.transpose(1, 2)
1534
- noise_pred_text_sum[..., current_context_tensor, :, :] += noise_pred_text.transpose(1, 2)
1535
-
1536
- # Batch increment for latent_counter
1537
  latent_counter[current_context_tensor] += 1
1538
 
1539
  torch.cuda.synchronize() # Synchronize GPU after batch addition
 
1527
  # Timing for batch addition and latent counter increment
1528
  torch.cuda.synchronize() # Synchronize GPU before batch addition
1529
  time_batch_addition_start = time.time()
1530
+
 
1531
  # Perform batch addition
1532
+ noise_pred_uncond_sum[..., current_context_indexes, :, :] += noise_pred_uncond
1533
+ noise_pred_text_sum[..., current_context_indexes, :, :] += noise_pred_text
 
 
1534
  latent_counter[current_context_tensor] += 1
1535
 
1536
  torch.cuda.synchronize() # Synchronize GPU after batch addition