Update pipeline.py
Browse files- pipeline.py +1 -3
pipeline.py
CHANGED
@@ -1109,12 +1109,12 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
|
|
1109 |
controlnet = self.controlnet._orig_mod if is_compiled_module(self.controlnet) else self.controlnet
|
1110 |
|
1111 |
# align format for control guidance
|
|
|
1112 |
if not isinstance(control_guidance_start, list) and isinstance(control_guidance_end, list):
|
1113 |
control_guidance_start = len(control_guidance_end) * [control_guidance_start]
|
1114 |
elif not isinstance(control_guidance_end, list) and isinstance(control_guidance_start, list):
|
1115 |
control_guidance_end = len(control_guidance_start) * [control_guidance_end]
|
1116 |
elif not isinstance(control_guidance_start, list) and not isinstance(control_guidance_end, list):
|
1117 |
-
control_end = control_guidance_end
|
1118 |
mult = len(controlnet.nets) if isinstance(controlnet, MultiControlNetModel) else 1
|
1119 |
control_guidance_start, control_guidance_end = (
|
1120 |
mult * [control_guidance_start],
|
@@ -1418,8 +1418,6 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
|
|
1418 |
# expand the latents if we are doing classifier free guidance
|
1419 |
latent_model_input = torch.cat([current_context_latents] * 2) if do_classifier_free_guidance else current_context_latents
|
1420 |
latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)
|
1421 |
-
|
1422 |
-
control_end_step = int(control_end*num_inference_steps)
|
1423 |
|
1424 |
if self.controlnet != None and i < int(control_end*num_inference_steps):
|
1425 |
|
|
|
1109 |
controlnet = self.controlnet._orig_mod if is_compiled_module(self.controlnet) else self.controlnet
|
1110 |
|
1111 |
# align format for control guidance
|
1112 |
+
control_end = control_guidance_end
|
1113 |
if not isinstance(control_guidance_start, list) and isinstance(control_guidance_end, list):
|
1114 |
control_guidance_start = len(control_guidance_end) * [control_guidance_start]
|
1115 |
elif not isinstance(control_guidance_end, list) and isinstance(control_guidance_start, list):
|
1116 |
control_guidance_end = len(control_guidance_start) * [control_guidance_end]
|
1117 |
elif not isinstance(control_guidance_start, list) and not isinstance(control_guidance_end, list):
|
|
|
1118 |
mult = len(controlnet.nets) if isinstance(controlnet, MultiControlNetModel) else 1
|
1119 |
control_guidance_start, control_guidance_end = (
|
1120 |
mult * [control_guidance_start],
|
|
|
1418 |
# expand the latents if we are doing classifier free guidance
|
1419 |
latent_model_input = torch.cat([current_context_latents] * 2) if do_classifier_free_guidance else current_context_latents
|
1420 |
latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)
|
|
|
|
|
1421 |
|
1422 |
if self.controlnet != None and i < int(control_end*num_inference_steps):
|
1423 |
|