Got inference error when using a SLAM3R point cloud aligned by Blender
The Backtrace:
python inference.py --point_cloud pcd/Replica_demo_room0_recon_aligned.ply --output Replica_demo_room0_recon_aligned.txt --model_path manycore-research/SpatialLM-Llama-1B
0%| | 0/1 [00:00<?, ?it/s]Generating layout...
The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's attention_mask to obtain reliable results.
Setting pad_token_id to eos_token_id:None for open-end generation.
The attention mask is not set and cannot be inferred from input because pad token is same as eos token. As a consequence, you may observe unexpected behavior. Please pass your input's attention_mask to obtain reliable results.
Exception in thread Thread-2 (generate):
Traceback (most recent call last):
File "/root/miniconda3/envs/spatiallm/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
File "/root/miniconda3/envs/spatiallm/lib/python3.11/threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/transformers/generation/utils.py", line 2215, in generate
result = self._sample(
^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/transformers/generation/utils.py", line 3206, in _sample
outputs = self(**model_inputs, return_dict=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/SpatialLM/spatiallm/model/spatiallm_llama.py", line 171, in forward
point_feature = self.forward_point_cloud(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/SpatialLM/spatiallm/model/spatiallm_llama.py", line 82, in forward_point_cloud
encoded_features = self.point_backbone(pc_sparse_tensor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/SpatialLM/spatiallm/model/pcd_encoder.py", line 280, in forward
outputs = self.sparse_resnet(point_cloud)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/SpatialLM/spatiallm/model/pcd_encoder.py", line 233, in forward
out = self.blocks(out)
^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/container.py", line 219, in forward
input = module(input)
^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/container.py", line 219, in forward
input = module(input)
^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/container.py", line 219, in forward
input = module(input)
^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/spatiallm/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/torchsparse-master/torchsparse/nn/modules/norm.py", line 24, in forward
batch_size = torch.max(coords[:, 0]).item() + 1
^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: max(): Expected reduction dim to be specified for input.numel() == 0. Specify the reduction dim with the 'dim' argument.
Blender version 4.3.2.
No error with the same point cloud file without blender alignmentation(just simply rotations)
Hi, is it possible to share the re-oriented point cloud, it would be easier for us to locate the potential issue. From the first glance, it maybe the re-oriented point cloud may have incorrect RGB channels?
Hi, is it possible to share the re-oriented point cloud, it would be easier for us to locate the potential issue. From the first glance, it maybe the re-oriented point cloud may have incorrect RGB channels?
So sorry for replying too late, anyway, the re-oriented point cloud file : https://we.tl/t-8fMnnh4vr3 (URL expires in 3 days)
Hi, thank you for sharing the point cloud. It seems that the size of the room is too small. The x, y, z dimension size is [1.16410637, 1.97957355, 0.71858807]. We expect the point cloud input is similar to real-world size. You can try enlarge the point cloud to have it has the room height around 2.7 meters. Checkout the example doc here. After the scaling, the model should work again.