k4yt3x / video2x

A machine learning-based lossless video super resolution framework. Est. Hack the Valley II, 2018.
https://video2x.org
GNU Affero General Public License v3.0
10.27k stars 983 forks source link

Possible memory leak? #1192

Open bunkbail opened 4 hours ago

bunkbail commented 4 hours ago

I'm new to video2x and I'm trying to use anime4k via libplacebo, no matter what I do the program will crash due to out of memory situation. I've only tried version 6.0.0-beta3. I've tested both Qt GUI version on Windows and CLI version on Linux via Docker. Video process managed to go further on Linux due to swap space but OOM will occur regardless. I have 16gb of RAM (same amount of swap) and I saw the process memory usage grew up to 32gb before OOM hits on Linux.

bunkbail commented 3 hours ago

A workaround I'm using right now is to split the original files into chunks of 1 min videos and process them that way. Every relaunches of video2x will reset the memory consumption so the leak won't be happening while processing each chunks. Here's a sample script that I'm using right now: https://gist.github.com/bunkbail/c573be00d4640779742511e8b1bbfacc