Matrix-Game icon indicating copy to clipboard operation
Matrix-Game copied to clipboard

If past_frames are a video instead of repeating initial_image

Open snowflakewang opened this issue 1 year ago • 4 comments

Hello, thank you for your great work! I noticed that

 if self.args.num_pre_frames > 0:
            past_frames = initial_image.repeat(self.args.num_pre_frames, 1, 1, 1)
            initial_image = torch.cat([initial_image, past_frames], dim=0)

in inference_bench.py, which means past_frames are all identical to the initial_image. If I want to use the model in autoregressive manner, which means past_frames are from a generated video clip (i.e. not totally identical), what kind of past_frames and initial_image should I input?

Thank you!

snowflakewang avatar Jun 24 '25 08:06 snowflakewang

@snowflakewang If you want to use the model in autoregressive manner, past_frame should consist of the last five frames from the generated video.

ori-gins avatar Jun 25 '25 02:06 ori-gins

@snowflakewang If you want to use the model in autoregressive manner, past_frame should consist of the last five frames from the generated video.

Thank you for your response! If I use the last 5 frames from a generated video, then what initial_image I should use?

snowflakewang avatar Jun 25 '25 03:06 snowflakewang

Use the last frame as the initial_image, and the five frames preceding the initial_image as past frames.

ori-gins avatar Jun 25 '25 03:06 ori-gins

Use the last frame as the initial_image, and the five frames preceding the initial_image as past frames.

Thank you for your quick response! If I understand correctly, [-6, -5, -4, -3, -2] should be past_frames, [-1] should be initial_image?

snowflakewang avatar Jun 25 '25 04:06 snowflakewang