DAIN icon indicating copy to clipboard operation
DAIN copied to clipboard

CUDA out of memory

Open iBobbyTS opened this issue 4 years ago • 3 comments

Is there a way to fix this? I'm using Tesla P100 with 16GB of Vram on Colab, when I tried to process 4K video it will give me this error RuntimeError: CUDA out of memory. Tried to allocate 8.10 GiB (GPU 0; 15.90 GiB total capacity; 9.09 GiB already allocated; 6.09 GiB free; 9.11 GiB reserved in total by PyTorch) I tried to change the code to process thr channels(RGB) separately, but it did,'t work. Is there other way I can process large video with limited Vram? Thank you.

iBobbyTS avatar Jul 15 '20 08:07 iBobbyTS

In the colab notebook in README, it says only 720p can be processed with 16GB of vram, but I found everytime I start, it can interpolate 1 frame, then it stops because vram is not enough. So if the video is 1080p, I make it interpolate one feame each time.

for i in range(png_generated_count-1):
  frame_interpolate(i+1, i+2)

I made the "frame_interpolate()" function before and left "start_frame" and "end_frame" as arguments. This works but it takes much longer then process all frames at once because it needs to initialize it every time. But 4K never works

iBobbyTS avatar Jul 15 '20 08:07 iBobbyTS

Hey, would you mind providing me with the customized version you made? I want to interpolate a 1080p video and keep running into the same kind of error with CUDA

tanerbajrovic avatar Aug 30 '20 21:08 tanerbajrovic

Hey, would you mind providing me with the customized version you made? I want to interpolate a 1080p video and keep running into the same kind of error with CUDA

I'm still adding functions, here's a version I archived, it should work. DAIN_Rewrite Here's a link to the tar that has python and dain built. You might need to hange the code little bit for the path of tar and video input. Built_files

iBobbyTS avatar Aug 31 '20 05:08 iBobbyTS