nerfacc icon indicating copy to clipboard operation
nerfacc copied to clipboard

RuntimeError: Trying to create tensor with negative dimension

Open recordmp3 opened this issue 1 year ago • 3 comments

Thank you for your wonderful work! Sometimes when I try to decrease the size of bounding box in function ray_marching, I get this error message. I'm sure the camera are all inside the bounding box. Do you have any idea why this happen?

recordmp3 avatar Dec 12 '22 08:12 recordmp3

this is what I get: File "/home/xxx/projects/nerfstudio4_saved/nerfstudio/model_components/ray_samplers.py", line 422, in forward packed_info, starts, ends = nerfacc.ray_marching( File "/home/xxx/anaconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "/home/xxx/anaconda3/envs/nerfstudio/lib/python3.8/site-packages/nerfacc/ray_marching.py", line 171, in ray_marching packed_info, t_starts, t_ends = _C.ray_marching( File "/home/xxx/anaconda3/envs/nerfstudio/lib/python3.8/site-packages/nerfacc/cuda/init.py", line 14, in call_cuda return getattr(_C, name)(*args, **kwargs) RuntimeError: Trying to create tensor with negative dimension -574604142: [-574604142, 1]

recordmp3 avatar Dec 12 '22 08:12 recordmp3

what is the parameters you used for ray_marching? It might be the case you are creating too many samples, which causes overflow. Currently the number of samples in each batch has to be smaller than 2,147,483,647 (int32)

liruilong940607 avatar Dec 30 '22 14:12 liruilong940607