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:
parent
43703fa05a
commit
c896ee4e0a
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user