Update WanAnimateToVideo to more easily extend videos. (#9959)

This commit is contained in:
comfyanonymous
2025-09-19 15:48:56 -07:00
committed by GitHub
parent 852704c81a
commit e8df53b764
2 changed files with 47 additions and 18 deletions

View File

@@ -451,7 +451,7 @@ class AnimateWanModel(WanModel):
def after_patch_embedding(self, x, pose_latents, face_pixel_values):
if pose_latents is not None:
pose_latents = self.pose_patch_embedding(pose_latents)
x[:, :, 1:] += pose_latents
x[:, :, 1:pose_latents.shape[2] + 1] += pose_latents[:, :, :x.shape[2] - 1]
if face_pixel_values is None:
return x, None