This commit is contained in:
Eugene Fairley 2025-06-27 12:07:30 -07:00
parent 075e17041b
commit 73ce203ad9
2 changed files with 5 additions and 4 deletions

View File

@ -1077,8 +1077,8 @@ class WAN21(BaseModel):
image = torch.zeros(shape_image, dtype=noise.dtype, layout=noise.layout, device=noise.device)
else:
image = utils.common_upscale(image.to(device), noise.shape[-1], noise.shape[-2], "bilinear", "center")
for i in range(0, image.shape[1], 16):
image[:, i: i + 16] = self.process_latent_in(image[:, i: i + 16])
for i in range(0, image.shape[1], 36):
image[:, i: i + 36] = self.process_latent_in(image[:, i: i + 36])
image = utils.resize_to_batch_size(image, noise.shape[0])
print(f"image shape: {image.shape}")

View File

@ -671,12 +671,13 @@ class WanTrackToVideo:
motion_patched = patch_motion(processed_tracks, y, temperature, (4, 16), topk)[None]
mask, video = motion_patched[:, 0:4], motion_patched[:, 4:]
# Add motion features to conditioning
concat_latent_image = vae.encode(image[:, :, :, :3])
positive = node_helpers.conditioning_set_values(positive,
{"concat_mask": motion_patched,
"concat_latent_image": image})
"concat_latent_image": concat_latent_image})
negative = node_helpers.conditioning_set_values(negative,
{"concat_mask": motion_patched,
"concat_latent_image": image})
"concat_latent_image": concat_latent_image})
# Handle clip vision output if provided