Skip to content

Wan 2.2 I2V shape error in prepare latents #294

@DefTruth

Description

@DefTruth
 elif last_image is None:
            # video_condition = torch.cat(
            #     [image, image.new_zeros(image.shape[0], image.shape[1], num_frames - 1, height, width)], dim=2
            # )
            video_condition = torch.cat(
                [image, image.new_zeros(image.shape[0], image.shape[1], num_latent_frames - 1, height, width)], dim=2
            )
            print("video_condition shape:", video_condition.shape) # torch.Size([1, 3, 21, 720, 544])
        else:
            last_image = last_image.unsqueeze(2)
            # video_condition = torch.cat(
            #     [image, image.new_zeros(image.shape[0], image.shape[1], num_frames - 2, height, width), last_image],
            #     dim=2,
            # )
            video_condition = torch.cat(
                [image, image.new_zeros(image.shape[0], image.shape[1], num_latent_frames - 2, height, width), last_image],
                dim=2,
            )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions