From ceda935e64d4393ec0024a3db0fe35dab18fe638 Mon Sep 17 00:00:00 2001 From: Matthew Tancik Date: Sun, 19 Feb 2023 13:53:01 -0800 Subject: [PATCH] Fix depth nerfacto exporting (#1453) --- nerfstudio/models/depth_nerfacto.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nerfstudio/models/depth_nerfacto.py b/nerfstudio/models/depth_nerfacto.py index 2bea84c7b..683c89e1f 100644 --- a/nerfstudio/models/depth_nerfacto.py +++ b/nerfstudio/models/depth_nerfacto.py @@ -70,7 +70,8 @@ class DepthNerfactoModel(NerfactoModel): def get_outputs(self, ray_bundle: RayBundle): outputs = super().get_outputs(ray_bundle) - outputs["directions_norm"] = ray_bundle.metadata["directions_norm"] + if ray_bundle.metadata is not None and "directions_norm" in ray_bundle.metadata: + outputs["directions_norm"] = ray_bundle.metadata["directions_norm"] return outputs def get_metrics_dict(self, outputs, batch):