Is there any way to make running out of memory not happen?
[Attachment 61076 - Click to enlarge]
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 8 of 8
Thread
-
-
You're running out of GPU ram, since you can't add more ram you need to swicth to using the CPU for this workload. i.e. no CUDA.
Or spend the money and buy a GPU with more RAM. -
-
GPU memory allocation and usage is a is a very complicated thing, you have 4gb video ram, PyTorch has reserved 2gb ram, about 600mb is already allocated and the "free" ram is most likely reserved by the OS.
https://developer.nvidia.com/blog/unified-memory-cuda-beginners/
https://developer.nvidia.com/blog/enhancing-memory-allocation-with-new-cuda-11-2-features/
https://en.wikipedia.org/wiki/Swap_chain
https://en.wikipedia.org/wiki/Multiple_b
There's a lot that goes into how GPU ram is used and allocated, but the long and short of it is that under normal circumstances it is not possible for an application to use all the video ram available.
I have seen instances where using multiple GPU filters simultaneously coupled with using a CUDA powered encoder maxed out all the video cards onboard ram and when that happened the GUI froze up and stopped responding, just like happens when all of the system ram and swap are used up.
You don't want to allocate all the available vram. -
Only way I see that might work is to split the video into tiles apply vsgan on the tiles separately and then join the tiles back together.
So something along the lines of:
Code:# split video into 4 tiles tile1 = core.std.CropRel(clip=clip, left=0, right = clip.width%2*1, top=0, bottom=clip.height%2*1) tile2 = core.std.CropRel(clip=clip, left=clip.width%2*1, right = 0, top=0, bottom=clip.height%2*1) tile3 = core.std.CropRel(clip=clip, left=0, right = clip.width%2*1, top=clip.height%2*1, bottom=0) tile4 = core.std.CropRel(clip=clip, left=clip.width%2*1, right = 0, top=clip.height%2*1, bottom=0) # load VSGAN from vsgan import VSGAN vsgan = VSGAN("cuda") vsgan.load_model(model) # apply VSGAN tile1 = vsgan.run(clip=tile1) tile2 = vsgan.run(clip=tile2) tile3 = vsgan.run(clip=tile3) tile4 = vsgan.run(clip=tile4) # join tiles clip = core.std.StackVertical([core.std.StackHorizontal([tile1, tile2]),core.std.StackHorizontal([tile3, tile4])])
users currently on my ignore list: deadrats, Stears555 -
btw. you can get some lower memory usage by enabling 'chunk' (it splits the frame in 4 parts):
Code:clip = vsgan.run(clip=clip, chunk=True)
see: https://github.com/rlaphoenix/VSGAN/issues/9
Cu Selurusers currently on my ignore list: deadrats, Stears555 -
I think I know how to solve your problem.
The exact same thing happens when AI upscaling in ESRGAN. If you don't have enough memory it just flat out fails.
However the reason it fails is not because you don't have enough memory. But because your GPU has a process timeout config. IE if it can't process what its
being asked in the time you are asking it it will flat out deny you.
Good news, Nvidia allows you to disable this if you'd like.
https://docs.nvidia.com/gameworks/content/developertools/desktop/timeout_detection_recovery.htm
You find it in NVIDIA Nsight tool:
https://developer.nvidia.com/tools-overview
Idk if it will actually work for you in this specific program but worth trying.
Similar Threads
-
Installing vapoursynth
By rrats in forum Newbie / General discussionsReplies: 3Last Post: 30th Sep 2021, 16:35 -
vapoursynth errors
By IAAMM in forum Newbie / General discussionsReplies: 7Last Post: 29th Mar 2021, 10:14 -
Vapoursynth error
By plshelpvapoursynth in forum Newbie / General discussionsReplies: 9Last Post: 23rd Aug 2020, 23:19 -
encoding with vapoursynth.
By zanzar in forum Newbie / General discussionsReplies: 31Last Post: 7th Mar 2019, 14:57 -
StaxRip 1.7.0.0 with Vapoursynth ?
By locky in forum Video ConversionReplies: 6Last Post: 24th Jan 2018, 18:08