LTX-2 - V2V (extend any video) Can it be changed?

#3
by paulhaul - opened

So it works great but its loading in the entire video (heavy) then decoding the entire video (even heavier) so you can only do it like once unless you have a super computer?

cant it take in the last 100 frames and audio, then vaedecode then merge to the previous video (something like this?)

Yes i'll try a more "Wan like" approach where just using last frame(s) as motion frames and generate from that.
The main challenge is audio, to make it consistent to the new video. Probably might work with some last audio frames, as ref audio.
Will try that, to make a workflow you can extend over and over, for an "infinite" video length.

But will be a separate workflow

But the current workflow is not that, its a "Re-Take" feature, that inpaints into the existing video (loaded as a whole), so you can inpaint start middle or end (and pad end). Its something LTX-2 has on their site even. So this might be something a few are looking for. Either to change a part of a video, or change end (and extend end).
But as you say, one drawback is length. Maximum input video is 21 seconds. And additionally a drawback is that it will use a lot of resources (ram)

Owner

Or thinking of it, maybe just chunking the loaded input video to be shorter input (with the "inpaint retake workflow") and then merge the videos at end....
Will try make one that is less resource hungry ;-)

Owner
This comment has been hidden

yeah i only been chucking in 100 frames or so then i'll probably use like capcut to redo the entire video as the end video is just frames i put in + new rather then the whole 15+15 seconds ect, unless im just not looking at a setting somewhere

Yes, should work fine. Will try make a workflow like that, that doesnt use whole video.
If using the "inpaint/retake" node, it says in the LTX-2 site that the minimum is 73 frames, so 100 frames should be plenty

From LTX documentation => "minimum 73 (around 3 seconds in 24fps), maximum 505 (around 21 seconds in 24fps)"

if its not an inconvenience could you please reduce the get/set node usage for easier readability? unet, clip, vae is fine but other things are hard to keep track of due to the get/set nodes.

Owner

if its not an inconvenience could you please reduce the get/set node usage for easier readability? unet, clip, vae is fine but other things are hard to keep track of due to the get/set nodes.

Did that to not be too much stuff on screen or too much spaghetti ;-)
but yes, i could always reduce it a bit

if its not an inconvenience could you please reduce the get/set node usage for easier readability? unet, clip, vae is fine but other things are hard to keep track of due to the get/set nodes.

Did that to not be too much stuff on screen or too much spaghetti ;-)
but yes, i could always reduce it a bit

I totally agree with you, its not that big of an issue it was just a little hard to keep track of wheres what coming from and looking through the whole workflow for that tiny set node xD, i like to kindof tidy things up with reroutes, easier to backtrack. But nonetheless absolutely love your workflows.

Workflow is updated to only use last X frames for the extension (instead of using whole video).
Should be much faster and lighter on the pc ;-)

The recommended overlap/reference frames is a minimum of 73 frames (or 3 seconds) (according to LTX), but seems to work ok with less too (the maximum is all up to 20 seconds of ref video).
The default in the workflow is set to 73 frames.

(and since it only using 73 last frames, it can be extended upon over and over, for a long length video, but eventually the model will probably "forget" some details etc that are not seen in the overlap frames)

--
Edit: made some tweaks should work even better , updated again ;-)

( watch until the end.. hehe .. )

Workflow is updated to only use last X frames for the extension (instead of using whole video).
Should be much faster and lighter on the pc ;-)

The recommended overlap/reference frames is a minimum of 73 frames (or 3 seconds) (according to LTX), but seems to work ok with less too (the maximum is all up to 20 seconds of ref video).
The default in the workflow is set to 73 frames.

(and since it only using 73 last frames, it can be extended upon over and over, for a long length video, but eventually the model will probably "forget" some details etc that are not seen in the overlap frames)

--
Edit: made some tweaks should work even better , updated again ;-)

( watch until the end.. hehe .. )

Nice work!
I noticed something in your examples (e.g. around ~0:08 in the latest video you attached), and I’m also seeing the same thing in my own tests: right after an extension seam, there’s a dark / semi-translucent overlay appearing near the outer edges of the frame.

Have you run into this as well? Any thoughts on what might be causing it or how to mitigate it?

Owner

I did notice that on some. Will check if there is some reason for it ;-)

Hi. i just found your workflow.
I had to recreate all Simple Calculator KJ nodes to make it work. Now it kinda works but i cant get it to extend anything. all i get is 2 sec video containing nothing more than a piece that was already in the ref video. I adjust EXTENSION (in seconds) to 5, 10 , 15 - doesn't change anything. Tried different input ref frames (the ref video is long enough) - deosn't help. What could be the problem?

Yes, unfortunately it seems like the calculator node had an update that wasnt backwards compatible.
I had some hectic work days, but will try update all the workflows with that node in them asap ;-)

The extended video basically adds a mask beyond the end of the input video, and this mask is then given new content based on previous frames and your prompt.
I'll try update the workflow real soon ;-)

Downloaded, and I tried the workflow here, and didn't have any calculator issues.
Make sure https://github.com/kijai/ComfyUI-KJNodes is up to date, and it should all work ;-)

(the calculator node had some updates recently, you need the latest version of KJnodes)

Downloaded, and I tried the workflow here, and didn't have any calculator issues.
Make sure https://github.com/kijai/ComfyUI-KJNodes is up to date, and it should all work ;-)

(the calculator node had some updates recently, you need the latest version of KJnodes)

Hey, seems like the issue I previously mentioned w/ the blurry dark overlay stuff doesn't happen in this sample video. How come? Is the seam here at the 8-9 seconds mark as well?

Hey, seems like the issue I previously mentioned w/ the blurry dark overlay stuff doesn't happen in this sample video. How come? Is the seam here at the 8-9 seconds mark as well?

Havent quite figured out that one. It happens in ComfyUI default workflow, and LTX-2 workflows as well.
Usually if the image has a bit of dark background. But been meaning to try figure that one out, unless its just a limitation of the model

@igorkur

i see now that the true/false (bolean) part of calculator came after kjnodes 1.2.9 version was set ... hopefully Kijai will find a reason soon to set version to 1.3.0 ;-)

So do this:
Open your file explorer to comfyui/custom_nodes/ComfyUI-KJNodes
Then if on windows, write CMD in the address field of Windows explorer, and in the command window write: git pull

Or if this is easier:

open terminal/windows command
cd "location of comfyui/custom_nodes/ComfyUI-KJNodes"
write git pull
Not 100% sure but i think you can also use "try update" in comfyUI manager, at the KJNodes entry, to achieve the same. (might have to set version to nightly)
But git pull as described above will for sure work ;-)

Sign up or log in to comment