4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 02:24:38 +08:00

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).
This commit is contained in:
Chung Min Kim 2023-11-26 22:11:05 -08:00 committed by GitHub
parent 43703fa05a
commit c896ee4e0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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