nerfstudio icon indicating copy to clipboard operation
nerfstudio copied to clipboard

@torch_compile() for function get_viewmat() cause the bad training results.

Open Miaosheng1 opened this issue 8 months ago • 1 comments

Describe the bug I've been testing SplatFacto on my device and encountered a peculiar issue. When I follow the original code and apply @torch_compile(), my results end up in local minima and fail to achieve good outcomes. However, when I comment out @torch_compile(), my code works correctly. I'm not sure why this happens, but I suggest avoiding the use of this decorator for speed optimization until it becomes more stable.

https://github.com/nerfstudio-project/nerfstudio/blob/9b3cbc79bf239eb3c69e7c288632aab02c4f0bb1/nerfstudio/models/splatfacto.py#L99-L115

Training PSNR ( add the decorator ): image

Training PSNR (Not add the decorator ): image

My running environment is as follows:

  • Device: NVIDIA GeForce RTX3090
  • Driver Version: 525.116.03
  • CUDA Version: 11.7
  • torch version: 2.0.1+cu117

Miaosheng1 avatar Jun 18 '24 08:06 Miaosheng1