diff --git a/gsplat/strategy/ops.py b/gsplat/strategy/ops.py index 9e0a2b446..ec6cbcddc 100644 --- a/gsplat/strategy/ops.py +++ b/gsplat/strategy/ops.py @@ -382,8 +382,8 @@ def optimizer_fn(key: str, v: Tensor) -> Tensor: _update_param_with_optimizer(param_fn, optimizer_fn, params, optimizers) # update the extra running state for k, v in state.items(): - v_new = torch.zeros((len(sampled_idxs), *v.shape[1:]), device=v.device) if isinstance(v, torch.Tensor): + v_new = torch.zeros((len(sampled_idxs), *v.shape[1:]), device=v.device) state[k] = torch.cat((v, v_new)) if scene is not None: scene.on_sample_add(sampled_idxs)