diff --git a/nerfstudio/engine/trainer.py b/nerfstudio/engine/trainer.py index 8959b27c7..74e3d25bf 100644 --- a/nerfstudio/engine/trainer.py +++ b/nerfstudio/engine/trainer.py @@ -149,12 +149,14 @@ class Trainer: for callback in self.callbacks: callback.run_callback_at_location(step, location=TrainingCallbackLocation.AFTER_TRAIN_ITERATION) - writer.put_time( - name=EventName.TRAIN_RAYS_PER_SEC, - duration=self.config.pipeline.datamanager.train_num_rays_per_batch / train_t.duration, - step=step, - avg_over_steps=True, - ) + # Skip the first two steps to avoid skewed timings that break the viewer rendering speed estimate. + if step > 1: + writer.put_time( + name=EventName.TRAIN_RAYS_PER_SEC, + duration=self.config.pipeline.datamanager.train_num_rays_per_batch / train_t.duration, + step=step, + avg_over_steps=True, + ) self._update_viewer_state(step)