Skip to content

Commit

Permalink
bug fix for splatfacto (nerfstudio-project#3367)
Browse files Browse the repository at this point in the history
* bug fix for splatfacto

* fix core tests

* Remove ipynb exclude for ruff, will fix in nerfstudio-project#3369

---------

Co-authored-by: Brent Yi <[email protected]>
  • Loading branch information
jb-ye and brentyi authored Aug 19, 2024
1 parent 0961160 commit a281d99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nerfstudio/models/splatfacto.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,9 @@ def refinement_after(self, optimizers: Optimizers, step):
avg_grad_norm = (self.xys_grad_norm / self.vis_counts) * 0.5 * max(self.last_size[0], self.last_size[1])
high_grads = (avg_grad_norm > self.config.densify_grad_thresh).squeeze()
splits = (self.scales.exp().max(dim=-1).values > self.config.densify_size_thresh).squeeze()
splits &= high_grads
if self.step < self.config.stop_screen_size_at:
splits |= (self.max_2Dsize > self.config.split_screen_size).squeeze()
splits &= high_grads
nsamps = self.config.n_split_samples
split_params = self.split_gaussians(splits, nsamps)

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ lint.ignore = [
"PLR0912", # Too many branches.
"PLW0603", # Globa statement updates are discouraged.
"PLW2901", # For loop variable overwritten.
"PLR1730", # Replace if statement with min/max
]

[tool.ruff.lint.isort]
Expand Down

0 comments on commit a281d99

Please sign in to comment.