hugoycj / torch-bakedsdf

An unofficial pytorch implementation of BakedSDF
https://bakedsdf.github.io/
MIT License
187 stars 8 forks source link

OutOfMemoryError : how to reduce GPU memory footprint ? #11

Open fabricecarles opened 7 months ago

fabricecarles commented 7 months ago

when I try to run : python launch.py --config configs/bakedsdf-colmap.yaml --gpu 0 --train I get this type of error in my GPU GeForce RTX 2070 (with 8 Gb of VRAM)

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 2.10 GiB (GPU 0; 7.79 GiB total capacity; 3.30 GiB already allocated; 341.44 MiB free; 5.82 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
Epoch 0: : 16it [02:12,  8.29s/it, loss=1.99, train/inv_s=20.10, train/num_rays=1226.0]

1) How can I change config to reduce GPU memory footprint ? 2) What is the minim amount of VRAM required ?