Quick fix to viewer OOM issue (#1053)

quick fix to viewer
This commit is contained in:
Ethan Weber authored and GitHub committed 2022-11-29 13:53:16 -08:00
1 parent 7280541350
commit 7346f97590
2 files changed
+5 -4

No files matched your search

+1 -1
View File
@@ -244,7 +244,7 @@ class Cameras(TensorDataclass):
if times.ndim == 0 or times.shape[-1] != 1:
times = times.unsqueeze(-1).to(self.device)
else:
raise ValueError(f"times must be a tensor, got {type(times)}")
raise ValueError(f"times must be None or a tensor, got {type(times)}")
return times
+4 -3
View File
@@ -325,7 +325,7 @@ class ViewerState:
# set the initial state whether to train or not
self.vis["renderingState/isTraining"].write(start_train)
self.vis["renderingState/render_time"].write(str(0))
# self.vis["renderingState/render_time"].write(str(0))
# set the properties of the camera
# self.vis["renderingState/camera"].write(json_)
@@ -756,8 +756,9 @@ class ViewerState:
dim=0,
)
times = float(self.vis["renderingState/render_time"].read())
times = torch.tensor([times])
times = self.vis["renderingState/render_time"].read()
if times:
times = torch.tensor([float(times)])
camera = Cameras(
fx=intrinsics_matrix[0, 0],