Skip to content

Commit

Permalink
fix gs loading
Browse files Browse the repository at this point in the history
  • Loading branch information
dendenxu committed Jan 7, 2024
1 parent da64f48 commit 748323e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 847 deletions.
2 changes: 1 addition & 1 deletion easyvolcap/utils/gaussian_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def create_from_pcd(self, xyz: torch.Tensor, colors: torch.Tensor, opacity: floa
@torch.no_grad()
def _load_state_dict_pre_hook(self, state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error_msgs):
# Supports loading points and features with different shapes
if prefix is not '': prefix = prefix + '.' # special care for when we're loading the model directly
if prefix is not '' and not prefix.endswith('.'): prefix = prefix + '.' # special care for when we're loading the model directly
for name, params in self.named_parameters():
params.data = params.data.new_empty(state_dict[f'{prefix}{name}'].shape)

Expand Down
Loading

0 comments on commit 748323e

Please sign in to comment.