$ sharp render -i _workspace/gaussians -o _workspace/renderings
Traceback (most recent call last):
File "ml-sharp/.venv/bin/sharp", line 8, in <module>
sys.exit(main_cli())
~~~~~~~~^^
File "ml-sharp/.venv/lib/python3.13/site-packages/click/core.py", line 1462, in __call__
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "ml-sharp/.venv/lib/python3.13/site-packages/click/core.py", line 1383, in main
rv = self.invoke(ctx)
File "ml-sharp/.venv/lib/python3.13/site-packages/click/core.py", line 1850, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "ml-sharp/.venv/lib/python3.13/site-packages/click/core.py", line 1246, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "ml-sharp/.venv/lib/python3.13/site-packages/click/core.py", line 814, in invoke
return callback(*args, **kwargs)
File "ml-sharp/src/sharp/cli/render.py", line 61, in render_cli
gaussians, metadata = load_ply(scene_path)
~~~~~~~~^^^^^^^^^^^^
File "ml-sharp/src/sharp/utils/gaussians.py", line 324, in load_ply
colors = cs_utils.sRGB2linearRGB(colors)
File "ml-sharp/src/sharp/utils/color_space.py", line 52, in sRGB2linearRGB
return robust_where(
sRGB <= THRESHOLD,
...<3 lines>...
branch_false_safe_value=THRESHOLD,
)
File "ml-sharp/src/sharp/utils/robust.py", line 40, in robust_where
input_2 = torch.where(~condition, input_2, branch_false_safe_value)
TypeError: where() received an invalid combination of arguments - got (numpy.ndarray, numpy.ndarray, float), but expected one of:
* (Tensor condition)
* (Tensor condition, Tensor input, Tensor other, *, Tensor out = None)
* (Tensor condition, Number self, Tensor other)
didn't match because some of the arguments have invalid types: (numpy.ndarray, numpy.ndarray, float)
* (Tensor condition, Tensor input, Number other)
didn't match because some of the arguments have invalid types: (numpy.ndarray, numpy.ndarray, float)
* (Tensor condition, Number self, Number other)
didn't match because some of the arguments have invalid types: (numpy.ndarray, numpy.ndarray, float)
The issue
Color space conversion from sRGB (Line 324) fails, because
colorsis expected to be a PyTorch tensor, but only converted later:ml-sharp/src/sharp/utils/gaussians.py
Lines 320 to 330 in cdb4ddc
How it happened
Ran prediction using cpu, then called:
Got this Stack trace: