Skip to content

Commit edb939f

Browse files
authored
Merge PR #502 from Kosinkadink/develop
Fix some calls for PIA, FancyVideo, AnimateLCM-I2V, and CameraControl not being refactored properly in PR
2 parents 2a5bb72 + 8b1afce commit edb939f

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

animatediff/sampling.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ def perform_special_model_features(self, model: BaseModel, conds: list, x_in: Te
6868
for special_model in special_models:
6969
if special_model.model.is_in_effect():
7070
attachment = get_mm_attachment(special_model)
71-
if attachment.is_pia():
71+
if attachment.is_pia(special_model):
7272
special_model.model.inject_unet_conv_in_pia_fancyvideo(model)
7373
conds = get_conds_with_c_concat(conds,
7474
attachment.get_pia_c_concat(model, x_in))
75-
elif attachment.is_fancyvideo():
75+
elif attachment.is_fancyvideo(special_model):
7676
# TODO: handle other weights
7777
special_model.model.inject_unet_conv_in_pia_fancyvideo(model)
7878
conds = get_conds_with_c_concat(conds,
@@ -90,9 +90,9 @@ def restore_special_model_features(self, model: BaseModel):
9090
if len(special_models) > 0:
9191
for special_model in reversed(special_models):
9292
attachment = get_mm_attachment(special_model)
93-
if attachment.is_pia():
93+
if attachment.is_pia(special_model):
9494
special_model.model.restore_unet_conv_in_pia_fancyvideo(model)
95-
elif attachment.is_fancyvideo():
95+
elif attachment.is_fancyvideo(special_model):
9696
# TODO: fill out
9797
special_model.model.restore_unet_conv_in_pia_fancyvideo(model)
9898

@@ -189,8 +189,9 @@ def _apply_model_wrapper(executor, *args, **kwargs):
189189
ADGS: AnimateDiffGlobalState = transformer_options["ADGS"]
190190
if ADGS.motion_models is not None:
191191
for motion_model in ADGS.motion_models.models:
192-
motion_model.prepare_alcmi2v_features(x=x, cond_or_uncond=cond_or_uncond, ad_params=ad_params, latent_format=executor.class_obj.latent_format)
193-
motion_model.prepare_camera_features(x=x, cond_or_uncond=cond_or_uncond, ad_params=ad_params)
192+
attachment = get_mm_attachment(motion_model)
193+
attachment.prepare_alcmi2v_features(motion_model, x=x, cond_or_uncond=cond_or_uncond, ad_params=ad_params, latent_format=executor.class_obj.latent_format)
194+
attachment.prepare_camera_features(motion_model, x=x, cond_or_uncond=cond_or_uncond, ad_params=ad_params)
194195
del x
195196
return executor(*args, **kwargs)
196197

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "comfyui-animatediff-evolved"
33
description = "Improved AnimateDiff integration for ComfyUI."
4-
version = "1.3.0"
4+
version = "1.3.1"
55
license = { file = "LICENSE" }
66
dependencies = []
77

0 commit comments

Comments
 (0)