From c896ee4e0a26f98f2b06ff17ecb6c99013816c4e Mon Sep 17 00:00:00 2001 From: Chung Min Kim Date: Sun, 26 Nov 2023 22:11:05 -0800 Subject: [PATCH] Remove PCA colormap bug for float output maps (#2620) Previously, "PCA" would be offered as a colormap option for float outputs (and throws "PCA is not a known colormap" error). --- nerfstudio/viewer_beta/control_panel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nerfstudio/viewer_beta/control_panel.py b/nerfstudio/viewer_beta/control_panel.py index faa027622..d11883684 100644 --- a/nerfstudio/viewer_beta/control_panel.py +++ b/nerfstudio/viewer_beta/control_panel.py @@ -445,7 +445,7 @@ def _get_colormap_options(dimensions: int, dtype: type) -> List[Colormaps]: if dimensions == 3: colormap_options = ["default"] if dimensions == 1 and dtype in [torch.float64, torch.float32, torch.float16, torch.bfloat16]: - colormap_options = [c for c in list(get_args(Colormaps)) if c != "default"] + colormap_options = [c for c in list(get_args(Colormaps)) if c not in ("default", "pca")] if dimensions > 3: colormap_options = ["pca"] return colormap_options