nerfstudio-project / nerfacc

A General NeRF Acceleration Toolbox in PyTorch.
https://www.nerfacc.com/
Other
1.38k stars 112 forks source link

Can't run the example after updating to 0.3.1 #110

Closed volcverse closed 1 year ago

volcverse commented 1 year ago

Hello there, thanks for sharing your amazing work!

It seems that something is wrong after updating to 0.3.1. I run the train_mlp_nerf.py and get this error:

Traceback (most recent call last):
 File "/home/XXX/Code/nerfacc/./examples/train_mlp_nerf.py", line 177, in <module>
    rgb, acc, depth, n_rendering_samples = render_image(
 File "/home/XXX/Code/nerfacc/examples/utils.py", line 88, in render_image
    ray_indices, t_starts, t_ends = ray_marching(
 File "/home/XXX/anaconda3/envs/neuris/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
 File "/home/XXX/Code/nerfacc/nerfacc/ray_marching.py", line 177, in ray_marching
    packed_info, ray_indices, t_starts, t_ends = _C.ray_marching(
ValueError: not enough values to unpack (expected 4, got 3)

My code is the newest from this repo. Any response will be greatly appreciated! Thank you!

liruilong940607 commented 1 year ago

Hi it seems like the nerfacc library is not updated in your environment.

you need to run pip install nerfacc==0.3.1 to update the library itself.

volcverse commented 1 year ago

Hi. I have tried this and the problem still accurs. And I have also tried cloning the newest repo and installed with pip install -e . but the problem is still there.

liruilong940607 commented 1 year ago

Oh could you try with rm -rf ~/.cache/torch_extensions/*/nerfacc_cuda? It might be the case that it does not rebuild itself when you upgrade.

If so, it sounds like a bug I need to fix.

volcverse commented 1 year ago

You are right. The problem is that it didn't rebuild itself. After deletion and rebuild it works now. Thank you!