From edd594c850119a81bc441e8c3b383afc14e5e823 Mon Sep 17 00:00:00 2001 From: Nicholas Pfaff Date: Thu, 6 Jul 2023 18:41:52 +0100 Subject: [PATCH] Fix background_color to outputs assignment --- nerfstudio/models/nerfacto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nerfstudio/models/nerfacto.py b/nerfstudio/models/nerfacto.py index 289f992fc..6674e197a 100644 --- a/nerfstudio/models/nerfacto.py +++ b/nerfstudio/models/nerfacto.py @@ -301,7 +301,7 @@ class NerfactoModel(Model): "accumulation": accumulation, "depth": depth, } - if background_color is not None: + if self.training and self.config.background_color == "random" and background_color is not None: outputs["background_color"] = background_color if self.config.predict_normals: