Workflow - Extend Any Video

#36
by RuneXX - opened

Original video (10 seconds):

Extended video (10 + 10 seconds):

A video to video workflow where you can extend any video to your given extension length.
https://huggingface.co/RuneXX/LTX-2-Workflows/blob/main/LTX-2%20-%20V2V%20(extend%20any%20video).json

Btw, is the extension only works like I2V, using only the first frame (taken from last frame of input video), or it can use last frame image too for the extension?

PS: i don't have access to PC right now, so i can't see the workflow visually.

it actually uses all frames (or whole video). Its just masking out what you want to "inpaint". And in case of extending, its just inpainting from the end of the video
So in theory you could do it in the middle of the video, instead of at the end (what LTX-2 calls ReTake), and change the middle part, or any other section of the video input

That being said, i'm struggling a little with the "ReTake" variant (inpaint within the video), trying to figure it out.
Currently i can retake the end of the video from an arbitrary start, but retake in the middle of the video didnt give good results

can use last frame image too for the extension?

The "Wan way". It will probably also work. With an image batch input from last frame or last frames as "motion frames".
I already had this working well when testing some nodes. But challenge was the audio. To keep it consistent from first video to second video. Might be some way.
But say for a dialog where first video is one person, and you want to use last frame(s), and turn the camera to a new person (with a different voice), it should work quite well

(and thinking of it, you could use the audio only from the "retake"/inpaint feature, or simply use a audio chunk from first video (last audio "frames") + last image frames from an image batch.. would probably work)

Hey RuneXX... getting an "Invalid number of frames: Encode input must have 1 + 8 * x frames (e.g., 1, 9, 17, ...). Please check your input." error when I try to extend a video towards the end during the LTXVImgToVideoInplace node's processing. Any ideas? Original video was 249 frames (from the FFLF DO ANYTHING workflow)... maybe that's the reason?

Hey RuneXX... getting an "Invalid number of frames: Encode input must have 1 + 8 * x frames (e.g., 1, 9, 17, ...). Please check your input." error when I try to extend a video towards the end during the LTXVImgToVideoInplace node's processing. Any ideas? Original video was 249 frames (from the FFLF DO ANYTHING workflow)... maybe that's the reason?

Yes it seems to be sensitive to number of frames. At the video loader set frame load cap to 1 + 8 * x ... for example 241 frames
I'll see if i can add some automatic math node that caps it correctly without having to change anything

image

Got it. Thank you! Amazing work.

Sign up or log in to comment