levindabhi / cloth-segmentation

This repo contains code and a pre-trained model for clothes segmentation.
MIT License
565 stars 102 forks source link

RuntimeError: CUDA out of memory. #10

Closed mayanktiwariiiitdmj closed 2 years ago

mayanktiwariiiitdmj commented 2 years ago

Hello, Thank you for providing the source code of this project. I need to run the code on my own machine having 6 GB GPU. When I am doing so, I am getting the following error:

RuntimeError: CUDA out of memory. Tried to allocate 12.00 MiB (GPU 0; 6.00 GiB total capacity; 5.30 GiB already allocated; 0 bytes free; 5.32 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

Can you please help me in solving this error?

mayanktiwariiiitdmj commented 2 years ago

I have solved the problem by reducing the HD image size to 25%. Now the code is running in my system having 6GB of GPU.