Update pipeline.py
Browse files- pipeline.py +3 -3
pipeline.py
CHANGED
@@ -1430,9 +1430,9 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
|
|
1430 |
latent_model_input = torch.cat([current_context_latents] * 2) if do_classifier_free_guidance else current_context_latents
|
1431 |
latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)
|
1432 |
|
1433 |
-
# get the current prompt index based on the current context
|
1434 |
-
|
1435 |
-
|
1436 |
print(current_prompt_index)
|
1437 |
|
1438 |
# 7 Add image embeds for IP-Adapter
|
|
|
1430 |
latent_model_input = torch.cat([current_context_latents] * 2) if do_classifier_free_guidance else current_context_latents
|
1431 |
latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)
|
1432 |
|
1433 |
+
# get the current prompt index based on the current context group (for blending between multiple prompts)
|
1434 |
+
current_prompt_index = int((context_group / len(context_indexes[i])) * len(prompt_embeds_list))
|
1435 |
+
|
1436 |
print(current_prompt_index)
|
1437 |
|
1438 |
# 7 Add image embeds for IP-Adapter
|