From 20f2575186bd7af857ec73c458890c4ca7075ae4 Mon Sep 17 00:00:00 2001 From: Ethan Weber Date: Tue, 1 Aug 2023 03:45:49 +0000 Subject: [PATCH] passing num_rays_per_batch properly --- .github/workflows/core_code_checks.yml | 1 - nerfstudio/data/pixel_samplers.py | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/core_code_checks.yml b/.github/workflows/core_code_checks.yml index dd952854c..761d4841b 100644 --- a/.github/workflows/core_code_checks.yml +++ b/.github/workflows/core_code_checks.yml @@ -42,4 +42,3 @@ jobs: - name: Test with pytest run: | pytest - timeout-minutes: 10 diff --git a/nerfstudio/data/pixel_samplers.py b/nerfstudio/data/pixel_samplers.py index e8f473e21..6780703b5 100644 --- a/nerfstudio/data/pixel_samplers.py +++ b/nerfstudio/data/pixel_samplers.py @@ -61,6 +61,10 @@ class PixelSampler: def __init__(self, config: PixelSamplerConfig, **kwargs) -> None: self.kwargs = kwargs self.config = config + # Possibly override some values if they are present in the kwargs dictionary + self.config.num_rays_per_batch = self.kwargs.get("num_rays_per_batch", self.config.num_rays_per_batch) + self.config.keep_full_image = self.kwargs.get("keep_full_image", self.config.keep_full_image) + self.config.is_equirectangular = self.kwargs.get("is_equirectangular", self.config.is_equirectangular) self.set_num_rays_per_batch(self.config.num_rays_per_batch) def set_num_rays_per_batch(self, num_rays_per_batch: int):