universome / epigraf

[NeurIPS 2022] Official pytorch implementation of EpiGRAF
https://universome.github.io/epigraf
150 stars 6 forks source link

How should I reduce the initial peak gpu memory? #3

Open tau-yihouxiang opened 2 years ago

tau-yihouxiang commented 2 years ago

I have run the source code and it works! I wonder how should I reduce the initial peak gpu memory, so that I can increase the resolution to 512. Thank you in advance!

image

universome commented 2 years ago

Hi! Turned out the problem was during printing G's summary. Looks like even using torch.no_grad() context does not help — likely due to some hooks inside the print_module_summary(...) function. I reduced the batch size for the call in this commit, so it should help (it did help me locally to resolve the problem). Thank you for reporting the issue!