mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-15 20:33:59 +08:00
Merge branch 'main' into generative
This commit is contained in:
30 files changed
+1493
-360
No files matched your search
@@ -154,10 +154,9 @@ def test_tensor_hash_encoder():
|
||||
)
|
||||
assert encoder.get_out_dim() == out_dim
|
||||
|
||||
in_tensor = torch.zeros((10, 3))
|
||||
in_tensor[..., 1] = 1
|
||||
encoded = encoder(in_tensor)
|
||||
assert encoded.shape == (10, out_dim)
|
||||
in_tensor = torch.rand((10, 3))
|
||||
encoded_torch = encoder(in_tensor)
|
||||
assert encoded_torch.shape == (10, out_dim)
|
||||
|
||||
encoder = encodings.HashEncoding(
|
||||
num_levels=num_levels,
|
||||
@@ -165,10 +164,8 @@ def test_tensor_hash_encoder():
|
||||
log2_hashmap_size=5,
|
||||
implementation="tcnn",
|
||||
)
|
||||
in_tensor = torch.zeros((10, 3))
|
||||
in_tensor[..., 1] = 1
|
||||
encoded = encoder(in_tensor)
|
||||
assert encoded.shape == (10, out_dim)
|
||||
encoded_tcnn = encoder(in_tensor).float().cpu()
|
||||
assert encoded_tcnn.shape == (10, out_dim)
|
||||
|
||||
|
||||
def test_kplane_encoder():
|
||||
|
||||
+5
-2
@@ -20,7 +20,6 @@ BLACKLIST = [
|
||||
"semantic-nerfw",
|
||||
"instant-ngp",
|
||||
"instant-ngp-bounded",
|
||||
"nerfacto",
|
||||
"nerfacto-big",
|
||||
"volinga",
|
||||
"phototourism",
|
||||
@@ -35,7 +34,11 @@ BLACKLIST = [
|
||||
|
||||
def set_reduced_config(config: TrainerConfig):
|
||||
"""Reducing the config settings to speedup test"""
|
||||
config.machine.num_gpus = 0
|
||||
config.machine.device_type = "cpu"
|
||||
if hasattr(config.pipeline.model, "implementation"):
|
||||
setattr(config.pipeline.model, "implementation", "torch")
|
||||
config.mixed_precision = False
|
||||
config.use_grad_scaler = False
|
||||
config.max_num_iterations = 2
|
||||
# reduce dataset factors; set dataset to test
|
||||
config.pipeline.datamanager.dataparser = BlenderDataParserConfig(data=Path("tests/data/lego_test"))
|
||||
|
||||
Reference in new issue
Block a user