sxyu / svox2

Plenoxels: Radiance Fields without Neural Networks
BSD 2-Clause "Simplified" License
2.79k stars 360 forks source link

AttributeError: 'NoneType' object has no attribute 'dict' when running launch.sh #81

Open pccross opened 2 years ago

pccross commented 2 years ago

Saw someone reported this issue in another thread, but got no response, so opening new issue: Their error: I ran this instruction "python .\opt.py .\nerf_synthetic\ship\ -t ckpt/res", but there is a error "if self.basis_type != BASIS_TYPE_MLP and imrend_fn_name in _C.dict and not torch.is_grad_enabled() and not return_raylen: AttributeError: 'NoneType' object has no attribute 'dict' ", can you tell me how to do then? Thanks in advance.

I'm getting this exact same error when running the launch.sh. AttributeError: 'NoneType' object has no attribute 'dict'

Here's additional info from log trace, pointing to line 1159 of svox2.py

Selecting random rays Eval step ^M 0%| | 0/6 [00:00<?, ?it/s]^M 0%| | 0/6 [00:00<?, ?it/s] Traceback (most recent call last): File "opt.py", line 471, in eval_step() File "opt.py", line 406, in eval_step rgb_pred_test = grid.volume_render_image(cam, use_kernel=True) File "/home/pccross38/miniconda3/envs/plenoxel/lib/python3.8/site-packages/svox2/svox2.py", line 1159, in volume_render_image if self.basis_type != BASIS_TYPE_MLP and imrend_fn_name in _C.dict and not torch.is_grad_enabled() and not return_raylen: AttributeError: 'NoneType' object has no attribute 'dict'

Any thoughts why dict might be empty?

WeiLi-THU commented 1 year ago

@pccross I have the same issue, do you now have this fixed?

harivnkochi commented 1 year ago

I faced the same error, and this is what I was able to gather: From the error message, it looks like _C is None in svox2.py If you look at the definition in utils.py, it says that if _C is None, that means the "CUDA extension svox2.csrc could not be loaded" This may mean your CUDA-dependent functions failed for whatever reason, check if your CUDA is installed and svox2 installed without warnings.

Once I got CUDA working and installed svox2 without errors, I did not face this error anymore.