SKEL icon indicating copy to clipboard operation
SKEL copied to clipboard

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument mat2 in method wrapper_CUDA_bmm)

Open zmhsmart opened this issue 7 months ago • 3 comments

Hello, thank you for your excellent work. I tried to reproduce your work and got the following error. Can you help me solve this problem? Thank you very much. $ python examples/skel_poses.py --gender male Error processing line 1 of /home/pbc/miniconda3/envs/zxh/lib/python3.8/site-packages/psbody-mesh-nspkg.pth:

Traceback (most recent call last): File "/home/pbc/miniconda3/envs/zxh/lib/python3.8/site.py", line 169, in addpackage exec(line) File "", line 1, in File "", line 553, in module_from_spec AttributeError: 'NoneType' object has no attribute 'loader'

Remainder of file ignored Traceback (most recent call last): File "examples/skel_poses.py", line 126, in skel_seq = SKELSequence(skel_layer=skel_model, betas=betas, poses_body=poses, poses_type='skel', File "/home/pbc/project/inference/SKEL/aitviewer-skel/aitviewer/renderables/skel.py", line 144, in init skel_output = self.fk() File "/home/pbc/project/inference/SKEL/aitviewer-skel/aitviewer/renderables/skel.py", line 441, in fk skel_output = self.skel_layer(poses=poses_body, betas=betas, trans=trans, poses_type=self.poses_type) File "/home/pbc/miniconda3/envs/zxh/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "/home/pbc/project/inference/SKEL/skel/skel_model.py", line 312, in forward v_shaped = skin_v0 + torch.matmul(shapedirs, betas).view(B, Ns, 3) RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument mat2 in method wrapper_CUDA_bmm)

zmhsmart avatar Jul 25 '24 04:07 zmhsmart