ashawkey / torch-ngp

A pytorch CUDA extension implementation of instant-ngp (sdf and nerf), with a GUI.
MIT License
2.11k stars 275 forks source link

The value of `self.cascade` becomes 0 when `bound <= 0.5`, causing errors #178

Open ShenhanQian opened 1 year ago

ShenhanQian commented 1 year ago

A remedy could be modifying https://github.com/ashawkey/torch-ngp/blob/b6e080468925f0bb44827b4f8f0ed08291dcf8a9/nerf/renderer.py#L73 to

self.cascade = max(1 + math.ceil(math.log2(bound)), 1)