ayaanzhaque / instruct-nerf2nerf

Instruct-NeRF2NeRF: Editing 3D Scenes with Instructions (ICCV 2023)
https://instruct-nerf2nerf.github.io/
MIT License
769 stars 64 forks source link

OutOfMemoryError #33

Closed veryverypro closed 1 year ago

veryverypro commented 1 year ago

I've got this error when training in2n:

OutOfMemoryError: CUDA out of memory. Tried to allocate 988.00 MiB (GPU 0; 23.70 GiB total capacity; 8.13 GiB already allocated; 14.50 MiB free; 9.20 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

=== What would be the problem? My environment is ubuntu linux with RTX3090.

ayaanzhaque commented 1 year ago

Ya I assume the issue is that you aren't downscaling your images, which is causing the model to throw an out of memory error. Add this to the end of your training command:

'nerfstudio-data --downscale-factor {2,4,6,8}`

Chose the right downscale factor based on what your original image size is. Whatever will get your images to be around 512 resolution. lEt me know if this solves your problem.