Skip to content

TypeError: rasterization() got an unexpected keyword argument 'ubp' #12

Description

@lengfeng-bot

Thanks for your great job!!
When I want to run the code,an has occurred:

(most recent call last):
  File "spotless_trainer.py", line 1266, in <module>
    main(cfg)
  File "spotless_trainer.py", line 1256, in main
    runner.train()
  File "spotless_trainer.py", line 577, in train
    renders, alphas, info = self.rasterize_splats(
  File "spotless_trainer.py", line 444, in rasterize_splats
    render_colors, render_alphas, info = rasterization(
TypeError: rasterization() got an unexpected keyword argument 'ubp'

When I corrected the gsplat version to match what you said, the same problem still occurred.Finally, I decided to comment out ubp, and the code worked fine.

        render_colors, render_alphas, info = rasterization(
            means=means,
            quats=quats,
            scales=scales,
            opacities=opacities,
            colors=colors,
            viewmats=torch.linalg.inv(camtoworlds),  # [C, 4, 4]
            Ks=Ks,  # [C, 3, 3]
            width=width,
            height=height,
            packed=self.cfg.packed,
            absgrad=self.cfg.absgrad,
            #ubp=self.cfg.ubp,
            sparse_grad=self.cfg.sparse_grad,
            rasterize_mode=rasterize_mode,
            **kwargs,
        )
        return render_colors, render_alphas, info

But when I added the ubp parameter, the code gave an error, as shown below:

Traceback (most recent call last):
  File "spotless_trainer.py", line 1269, in <module>
    main(cfg)
  File "spotless_trainer.py", line 1259, in main
    runner.train()
  File "spotless_trainer.py", line 727, in train
    self.update_running_stats(info)
  File "/home/deepnavi/abandon/conda_envs/gaussian/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "spotless_trainer.py", line 887, in update_running_stats
    sqrgrads = info["means2d"].sqrgrad.clone()
AttributeError: 'Tensor' object has no attribute 'sqrgrad'
^CError in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/deepnavi/abandon/conda_envs/gaussian/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1504, in _clean_up_worker
    w.join(timeout=_utils.MP_STATUS_CHECK_INTERVAL)
  File "/home/deepnavi/abandon/conda_envs/gaussian/lib/python3.8/multiprocessing/process.py", line 149, in join
    res = self._popen.wait(timeout)
  File "/home/deepnavi/abandon/conda_envs/gaussian/lib/python3.8/multiprocessing/popen_fork.py", line 44, in wait
    if not wait([self.sentinel], timeout):
  File "/home/deepnavi/abandon/conda_envs/gaussian/lib/python3.8/multiprocessing/connection.py", line 931, in wait
    ready = selector.select(timeout)
  File "/home/deepnavi/abandon/conda_envs/gaussian/lib/python3.8/selectors.py", line 415, in select
    fd_event_list = self._selector.poll(timeout)
``
I would like to know how to solve this problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions