From c95fcffd10361654e0b872efc589b789a787e1be Mon Sep 17 00:00:00 2001 From: MotivaCG Date: Sat, 1 Feb 2025 17:05:45 +0100 Subject: [PATCH] Add disable_video flag for simple_trainer --- examples/simple_trainer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/simple_trainer.py b/examples/simple_trainer.py index ca9271e81..de0e230b9 100644 --- a/examples/simple_trainer.py +++ b/examples/simple_trainer.py @@ -90,6 +90,8 @@ class Config: save_ply: bool = False # Steps to save the model as ply ply_steps: List[int] = field(default_factory=lambda: [7_000, 30_000]) + # Whether to disable video generation during training and evaluation + disable_video: bool = False # Initialization strategy init_type: str = "sfm" @@ -932,6 +934,8 @@ def eval(self, step: int, stage: str = "val"): @torch.no_grad() def render_traj(self, step: int): """Entry for trajectory rendering.""" + if self.cfg.disable_video: + return print("Running trajectory rendering...") cfg = self.cfg device = self.device