Diffusers
video-to-video

Very large RAM foot print.

#1
by BigDeeper - opened

I would like to process longer videos, but the amount of RAM required is huge. For 7 minute video it is around 150GiB at the highest "waterline."

Could anyone suggest if it is possible to adjust the inference script to reduce use of RAM? I don't really want to make pieces smaller than 7 minutes, I am already breaking 28 minutes into 4 pieces, since I have 4 GPUs.

The code has a lot of areas for improvements and I also changed the code a lot in order to fit it to a particular use case. If you have a specific case maybe we could also optimize LatentSync code for it. Let me know about your thoughts on that.

The code has a lot of areas for improvements and I also changed the code a lot in order to fit it to a particular use case. If you have a specific case maybe we could also optimize LatentSync code for it. Let me know about your thoughts on that.

It appears that the current code holds the entire video, 100% of frames in RAM as processing of individual frames happens. There is no reason to hold all the frames in memory. Some parameter should be set to allow a smaller size window, e.g. 3,4 minutes, after which processed frames are written out to disk storage, objects that held those frames for processing are deleted, and gc.collect() is called in the script to release RAM.

Well, you are free to modify the script and use it. Nobody is stopping you. If you need some parameter, then you should be able to code them. It is easy.

Well, you are free to modify the script and use it. Nobody is stopping you. If you need some parameter, then you should be able to code them. It is easy.

You shouldn't have asked if you didn't want to do it. What's this "If you have a specific case maybe we could also optimize LatentSync code for it."?

BigDeeper changed discussion status to closed
Your need to confirm your account before you can post a new comment.

Sign up or log in to comment