diff --git a/nerfstudio/data/pixel_samplers.py b/nerfstudio/data/pixel_samplers.py index 93de0a996..ad11ee409 100644 --- a/nerfstudio/data/pixel_samplers.py +++ b/nerfstudio/data/pixel_samplers.py @@ -396,6 +396,10 @@ class PatchPixelSampler(PixelSampler): config: PatchPixelSamplerConfig + def __init__(self, config: PatchPixelSamplerConfig, **kwargs) -> None: + super().__init__(config, **kwargs) + self.config.patch_size = self.kwargs.get("patch_size", self.config.patch_size) + def set_num_rays_per_batch(self, num_rays_per_batch: int): """Set the number of rays to sample per batch. Overridden to deal with patch-based sampling.