dcharatan / pixelsplat

[CVPR 2024 Oral, Best Paper Runner-Up] Code for "pixelSplat: 3D Gaussian Splats from Image Pairs for Scalable Generalizable 3D Reconstruction" by David Charatan, Sizhe Lester Li, Andrea Tagliasacchi, and Vincent Sitzmann
http://davidcharatan.com/pixelsplat/
MIT License
906 stars 62 forks source link

weird error in sh_rotation.py #21

Closed Ira569 closed 9 months ago

Ira569 commented 9 months ago

I found sh_rotation.py can't be run correctly and got this error. File "/home/lkshpc/miniconda3/envs/pixelSplat/lib/python3.10/site-packages/e3nn/o3/_wigner.py", line 96, in wigner_D return torch.matrix_exp(alpha X[1]) @ torch.matrix_exp(beta X[0]) @ torch.matrix_exp(gamma * X[1]) RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

It seems the 21,22 line in sh_rotation.py is wrong but i don't know how to fix this. I tried to delete and change this code:"with torch.cuda.device(device)",but it seems does't work

with torch.cuda.device(device)
            sh_rotations = wigner_D(degree, alpha, beta, gamma).type(dtype)
Ira569 commented 9 months ago

it seems package e3nn's version is wrong,and "pip install e3nn==0.4.0" can fix this. it's ok now.