bark icon indicating copy to clipboard operation
bark copied to clipboard

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 5.80 GiB total capacity; 5.64 GiB already allocated; 15.69 MiB free; 5.65 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

Open yangcopnuli opened this issue 1 year ago • 3 comments

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 5.80 GiB total capacity; 5.64 GiB already allocated; 15.69 MiB free; 5.65 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

yangcopnuli avatar Jul 31 '23 06:07 yangcopnuli

If you're running it in an interactive notebook, try restarting the environment. That'll free up memory.

praetor29 avatar Aug 01 '23 05:08 praetor29

Try this it worked for me https://github.com/suno-ai/bark/issues/315#issuecomment-1568127751

Knackii avatar Aug 14 '23 11:08 Knackii

I figured out a solution, load modules on demand rather than load them all at the same time, try this pull request: https://github.com/suno-ai/bark/pull/531

asterocean avatar Feb 24 '24 19:02 asterocean