smoothieAI commited on
Commit
8dd3a30
·
verified ·
1 Parent(s): b9d8a02

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +6 -5
pipeline.py CHANGED
@@ -843,11 +843,11 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
843
  image_batch_size = len(image)
844
  print("prepared control image_batch_size", image_batch_size)
845
 
846
- if image_batch_size == 1:
847
- repeat_by = batch_size
848
- else:
849
- # image batch size is the same as prompt batch size
850
- repeat_by = num_images_per_prompt
851
 
852
  # image = image.repeat_interleave(repeat_by, dim=0)
853
 
@@ -1194,6 +1194,7 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
1194
 
1195
  # 6. Prepare extra step kwargs. TODO: Logic should ideally just be moved out of the pipeline
1196
  extra_step_kwargs = self.prepare_extra_step_kwargs(generator, eta)
 
1197
  # 7 Add image embeds for IP-Adapter
1198
  added_cond_kwargs = {"image_embeds": image_embeds} if ip_adapter_image is not None else None
1199
 
 
843
  image_batch_size = len(image)
844
  print("prepared control image_batch_size", image_batch_size)
845
 
846
+ # if image_batch_size == 1:
847
+ # repeat_by = batch_size
848
+ # else:
849
+ # # image batch size is the same as prompt batch size
850
+ # repeat_by = num_images_per_prompt
851
 
852
  # image = image.repeat_interleave(repeat_by, dim=0)
853
 
 
1194
 
1195
  # 6. Prepare extra step kwargs. TODO: Logic should ideally just be moved out of the pipeline
1196
  extra_step_kwargs = self.prepare_extra_step_kwargs(generator, eta)
1197
+
1198
  # 7 Add image embeds for IP-Adapter
1199
  added_cond_kwargs = {"image_embeds": image_embeds} if ip_adapter_image is not None else None
1200