mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-15 12:23:46 +08:00
When generating depth images, use torch_compile with ZoeDepth for compatibility (#2303)
* Use torch_compile with Zoe for compatibility torch_compile module support Previously the compatibility utility torch.compile worked for functions, but not for modules as torch.compile was originally employed here. * torch_compile -> Any
This commit is contained in:
1 parent
cf2d90d009
commit
cb2405d3ea
2 files changed
+11
-4
No files matched your search
@@ -24,6 +24,7 @@ from nerfstudio.data.dataparsers.base_dataparser import DataparserOutputs
|
||||
from nerfstudio.model_components import losses
|
||||
from nerfstudio.data.datasets.base_dataset import InputDataset
|
||||
from nerfstudio.data.utils.data_utils import get_depth_image_from_path
|
||||
from nerfstudio.utils.misc import torch_compile
|
||||
from nerfstudio.utils.rich_utils import CONSOLE
|
||||
|
||||
from typing import Union
|
||||
@@ -72,7 +73,7 @@ class DepthDataset(InputDataset):
|
||||
filenames = dataparser_outputs.image_filenames
|
||||
|
||||
repo = "isl-org/ZoeDepth"
|
||||
self.zoe = torch.compile(torch.hub.load(repo, "ZoeD_NK", pretrained=True).to(device))
|
||||
self.zoe = torch_compile(torch.hub.load(repo, "ZoeD_NK", pretrained=True).to(device))
|
||||
|
||||
for i in track(range(len(filenames)), description="Generating depth images"):
|
||||
image_filename = filenames[i]
|
||||
|
||||
Reference in new issue
Block a user