From 67b1005784b42e04a8246e9474a9242c09c0e243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Sok=C3=B3lski?= Date: Thu, 25 Jan 2024 23:04:14 +0000 Subject: [PATCH] Fix "mutable default" error in render.py (#2825) This fixes ``` ValueError: mutable default for field obb is not allowed: use default_factory ``` --- nerfstudio/scripts/render.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nerfstudio/scripts/render.py b/nerfstudio/scripts/render.py index d47af785c..27901f2c1 100644 --- a/nerfstudio/scripts/render.py +++ b/nerfstudio/scripts/render.py @@ -364,7 +364,7 @@ class CropData: background_color: Float[Tensor, "3"] = torch.Tensor([0.0, 0.0, 0.0]) """background color""" - obb: OrientedBox = OrientedBox(R=torch.eye(3), T=torch.zeros(3), S=torch.ones(3) * 2) + obb: OrientedBox = field(default_factory=lambda: OrientedBox(R=torch.eye(3), T=torch.zeros(3), S=torch.ones(3) * 2)) """Oriented box representing the crop region""" # properties for backwards-compatibility interface