4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 10:34:29 +08:00

Fix divide by zero when train util set to 1 (#1757)

* fix divide by zero when train util set to 1

* Run black

---------

Co-authored-by: Brent Yi <yibrenth@gmail.com>
This commit is contained in:
Dylan Hu 2023-04-18 02:33:54 -04:00 committed by GitHub
parent c1c7a3b283
commit 797e9012fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -303,7 +303,7 @@ class ViewerState:
if self.camera_message is None:
return
if self.trainer is not None and self.trainer.is_training:
if self.trainer is not None and self.trainer.is_training and self.control_panel.train_util != 1:
if (
EventName.TRAIN_RAYS_PER_SEC.value in GLOBAL_BUFFER["events"]
and EventName.VIS_RAYS_PER_SEC.value in GLOBAL_BUFFER["events"]