Skip to content

Another LTX-Video tricks? I could almost cut the Vram half.

1 / 2
Not downloaded yet
Not downloaded yet

Hey all, another interesting found, I added a "purgeVram" node to the network, then it could cut almost half vram usage, it's seems too good to be true, would anyone like to test this as well? I am not even sure if this is legit. but It generate the movie fine.

https://preview.redd.it/gluh1vji9v3e1.png?width=1086&format=png&auto=webp&s=99ae0b9dcb37ef30d77c539af0a89ddf584a5539

https://i.redd.it/2kexgl2j9v3e1.gif

74 points37 comments
Open on Reddit
About this post
Posted
Archived
Score
74 · 93% up
Kind
Gallery · 2 files
ID
1h2phpj

Author

57
posts
348
comments
76
media
View profile

42 comments

I got 4080S 16G vram, I could generate 576*864 video 65 frames in 50s with only using around 9G vram. I can go much frames without exceeding the vram, so the node can released quite a bit vram before sampling/generating the video. But I did tried higher resolution It start getting weired result.
here are some other test.

https://i.redd.it/ih0wbv1eev3e1.gif

9 points

https://i.redd.it/s5u49na27w3e1.gif

now I am very happy what LTX-video could do, especially with the fast speed. Online closed model like Hailuoai/Runway still miles better, but for the local open model running with consumer card, this is currently the best we could get!

6 points

Not sure how to get natural motion that way... using the standard out of the box settings, and even adjusting up... it's superfast on my 4090... but the videos either 1. don't move at all... or 2. just disolve into nothing... wish it spit out anything coherent close to being usable for me.

3 points

Yea I do use this and https://github.com/ShmuelRonen/ComfyUI-FreeMemory

Its almost required cause ComfyUI has habit of caching stuff you might or might not need, including just ton of garbage that just sits there. It gets especially bad if you cancel jobs a lot and retry often. If left unchecked, with FLUX, you might get OOM really fast.

And yea, they legit.

6 points

Thanks! I tried and the function looks basically the same, this is much more light-weight custom nodes pack, as I don't need all other nodes other than purgeVram, I will switch to freeMemory.

https://preview.redd.it/56vwjyvlv04e1.png?width=1161&format=png&auto=webp&s=1bace44beaeec197a715af6ffef85839d3b8b0a2

1 points

I didnt really give it that extensive testing, just using FreeMemory based mostly on habit, have you tested if it really works the same?

1 points

Can you share your workflows?

1 points

It fits into any workflow, you can simply load any of these nodes it before for example Ksampler to clean it up a bit before inference. And some after doing inference, so before VAE. Aggresive mode does about same as purgeVRAM, but its still not that "wipe everything" I think.

I suspect purgeVRAM is a bit more effective.

2 points

I'm wondering if there is such an opportunity to screw with cogVideo, or maybe what is the alternative?)

2 points

I use the UnloadAllModels node quite a lot for my 7900xtx. it does essentially the same thing, though you put it in between nodes rather than have it stand on it's own (I put it between my ksampler and vae... I also sometimes put it after the vae encode and before the preview image). It's quite useful, but it does add a few seconds to the total generation time. Don't use it unless you need it.

1 points

Doesn't appear to do anything for me on 8gb, I use --lowvram though so maybe it already does this

1 points

I got it running on my laptop that has a 1070 8GB. It takes about 20 minutes for a 113 frame 768 x 512 at 50 steps doing i2v.

1 points

when it exceeding vram it will be much slower, that's the point freeMemory/purgeVram can release vram cache before generate the movie, do you see the vram usage different with and without the node?

1 points

I just slammed default comfy blog native workflow

Wrote overly intricate prompt as it said to do.

It generates on 8gb vram 3070+32ram no problem.

Bigger res breaks the animation though.

1 points

Amazing trick! LTX-Video is really promising. Btw, what text encoder do you use, t5xxl or PixArt? With this trick maybe it's easier to use PixArt which demands more vram during text encoding. And "it seems to have a better prompt adherence in conjunction with the LTXV model. It also produces better video with lower number of steps (in comparison with the same number of steps using t5xxl)." according by this article

1 points

Comfyui didn't used to have problems with going and using too much vram. But after the update with the new UI it's gotten pretty bad. Anyone know what happened?

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.