zhengyuf/IMavatar

CUDA out of memory

carlosedubarreto opened this issue · 2 comments

Hello, I'm having this problem of cuda out of memory.
My GPU has 6gb of ram, is there some configuration that I coudl do to make it run? Thanks

The error:
RuntimeError: CUDA out of memory. Tried to allocate 66.00 MiB (GPU 0; 6.00 GiB total capacity; 4.25 GiB already allocated; 0 bytes free; 4.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

you'll have to reduce the number of pixels here:

I have not tried a smaller number of pixels though, so no sure whether training can work.

thank you for the fast answer, but changing that gave me the same error.

My best solution was to decrease the img_res to 64.

dataset{
    data_folder = ../data/datasets
    subject_name = yufeng
    json_name = flame_params.json
    train{
        sub_dir = [MVI_1810, MVI_1814] # in main paper, we used [MVI_1810, MVI_1811]
        # img_res = [256, 256]
        img_res = [64, 64]
        subsample = 1
    }
    test{
        sub_dir = [MVI_1812]
        # img_res = [256, 256]
        img_res = [64, 64]
        subsample=  200
    }

These were the changes I made. and now it is creating the ply.
This is such an amazing work that you've done... simply amazing.