ComfyUI-LTXVideo icon indicating copy to clipboard operation
ComfyUI-LTXVideo copied to clipboard

Model v0.9.1 consumes much more VRAM

Open Kvento opened this issue 1 year ago • 11 comments

It seems that my new model consumes much more VRAM than model v0.9. On model v0.9 I could generate 1280x720 with 97 frames and all this fit in 11gb VRAM (on 2080ti). And on model v0.9.1 I could only start generation with a resolution of 632x280 at 97 frames. At the same time, during generation there is still free VRAM, but during VAE decoding, the consumption increases sharply. So I was able to achieve only this resolution taking into account the consumption of the VAE decoder. Has anyone else encountered this problem?

I am using the new workflow from the description.

The question is whether this is related to the model or to the nodes?

Kvento avatar Dec 20 '24 18:12 Kvento

I'm seeing the same issue here as well, VRAM usage is much higher on 0.9.1 than it was on 0.9. I keep running into Out Of Memory errors with the provided i2v workflow. I don't have a solution for this, unfortunately, but wanted to point out this is not an isolated issue as it was also reported here: https://www.reddit.com/r/StableDiffusion/comments/1hhz17h/comment/m2v4hi0/

gshawn3 avatar Dec 20 '24 19:12 gshawn3

Also same issue here, but I was able to fix it with a Clean VRAM node right after the Sampler and before VAE Decode. I also put another one between the Guider and Sampler. Fixed the issue for me.

jroc22 avatar Dec 20 '24 19:12 jroc22

Also same issue here, but I was able to fix it with a Clean VRAM node right after the Sampler and before VAE Decode. I also put another one between the Guider and Sampler. Fixed the issue for me.

can you provide a screenshot, please?

apedance avatar Dec 20 '24 19:12 apedance

Also same issue here, but I was able to fix it with a Clean VRAM node right after the Sampler and before VAE Decode. I also put another one between the Guider and Sampler. Fixed the issue for me.

can you provide a screenshot, please?

Screenshot 2024-12-20 115622

jroc22 avatar Dec 20 '24 19:12 jroc22

Also same issue here, but I was able to fix it with a Clean VRAM node right after the Sampler and before VAE Decode. I also put another one between the Guider and Sampler. Fixed the issue for me.

can you provide a screenshot, please?

Screenshot 2024-12-20 115622

Where do you find that Clean VRAM node from - I don't see it anywhere? is it a part of another package?

YAY-3M-TA3 avatar Dec 21 '24 07:12 YAY-3M-TA3

You can use the free memory tool as well to clean ram and/or vram. Here the link: [https://github.com/ShmuelRonen/ComfyUI-FreeMemory] (To install open cmd from the comfyui node directory and git clone it!) 😎

IAMCCS avatar Dec 21 '24 08:12 IAMCCS

Even with Clean VRAM I can't get this workflow to run properly. I get to the SamplerStage with the Clean VRAM nodes but it seems to get stuck there. RTX 2080 ti 11gb vram - whole workflow seems to consume about 14gb vram. might be even more if I could get further. Does Florence2 take up vram?

image image

apedance avatar Dec 21 '24 08:12 apedance

Even with Clean VRAM I can't get this workflow to run properly. I get to the SamplerStage with the Clean VRAM nodes but it seems to get stuck there. RTX 2080 ti 11gb vram - whole workflow seems to consume about 14gb vram. might be even more if I could get further. Does Florence2 take up vram?

Clean VRAM does not reduce the memory consumption of the model during generation. It simply allows us to get rid of the increased consumption during VAE decoding. I believe that the model itself has become much more memory-consuming than the previous one. All that remains is to wait until someone releases a quantized GGUF version. Until then, with the amount of VRAM we have, we can either make do with low-resolution generation or use the old model.

Kvento avatar Dec 21 '24 09:12 Kvento

Yeah, the new VAE node might need to expose a tiling and minimum size - then it can fit in VRAM... (Like how kijai's Hunyuan comfyui VAE decoder works...)

YAY-3M-TA3 avatar Dec 21 '24 14:12 YAY-3M-TA3

image Because the official workflow of LTXVideo does not support ComfyUI's VAE Decode (Tiled) node, otherwise it will save a lot of vram.

In addition, after the generation is completed, vram should also be cleared before the decoding stage. I think this is not a problem with the model itself, but a defect of this node group.

Packsod avatar Dec 22 '24 03:12 Packsod

do we need to use the new VAE from lighttricks repo ? I dont use the new VAE file, it works

x4080 avatar Dec 23 '24 21:12 x4080