Skip to content

RuntimeError: Trying to create tensor with negative dimension #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
recordmp3 opened this issue Dec 12, 2022 · 3 comments
Open

RuntimeError: Trying to create tensor with negative dimension #132

recordmp3 opened this issue Dec 12, 2022 · 3 comments

Comments

@recordmp3
Copy link

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
Copy link
Author

recordmp3 commented Dec 12, 2022

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]

@liruilong940607
Copy link
Collaborator

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)

@xdobetter
Copy link

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]

Hello,I also have same problem,Could you tell me how to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants