mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-02 05:48:57 +08:00
merge
This commit is contained in:
commit
75d1013d60
1 file changed
+3
-1
@@ -100,7 +100,9 @@ class CameraOptimizer(nn.Module):
|
|||||||
assert_never(self.config.mode)
|
assert_never(self.config.mode)
|
||||||
# Detach non-trainable indices by setting to identity transform
|
# Detach non-trainable indices by setting to identity transform
|
||||||
if self.non_trainable_camera_indices is not None:
|
if self.non_trainable_camera_indices is not None:
|
||||||
outputs[0][self.non_trainable_camera_indices] = torch.eye(4, device=self.device)[:3, :4]
|
if self.non_trainable_camera_indices.device != self.pose_adjustment.device:
|
||||||
|
self.non_trainable_camera_indices = self.non_trainable_camera_indices.to(self.pose_adjustment.device)
|
||||||
|
outputs[0][self.non_trainable_camera_indices] = torch.eye(4, device=self.pose_adjustment.device)[:3, :4]
|
||||||
|
|
||||||
# Return: identity if no transforms are needed, otherwise multiply transforms together.
|
# Return: identity if no transforms are needed, otherwise multiply transforms together.
|
||||||
if len(outputs) == 0:
|
if len(outputs) == 0:
|
||||||
|
|||||||
Reference in new issue
Block a user