Spaces:
Running
on
Zero
Running
on
Zero
xinjie.wang
commited on
Commit
·
87a4b81
1
Parent(s):
2220050
update
Browse files
embodied_gen/models/sam3d.py
CHANGED
|
@@ -23,7 +23,8 @@ from typing import Optional, Union
|
|
| 23 |
|
| 24 |
import numpy as np
|
| 25 |
from hydra.utils import instantiate
|
| 26 |
-
from modelscope import snapshot_download
|
|
|
|
| 27 |
from omegaconf import OmegaConf
|
| 28 |
from PIL import Image
|
| 29 |
|
|
@@ -57,7 +58,8 @@ class Sam3dInference:
|
|
| 57 |
self, local_dir: str = "weights/sam-3d-objects", compile: bool = False
|
| 58 |
) -> None:
|
| 59 |
if not os.path.exists(local_dir):
|
| 60 |
-
snapshot_download("facebook/sam-3d-objects", local_dir=local_dir)
|
|
|
|
| 61 |
config_file = os.path.join(local_dir, "checkpoints/pipeline.yaml")
|
| 62 |
config = OmegaConf.load(config_file)
|
| 63 |
config.rendering_engine = "nvdiffrast"
|
|
|
|
| 23 |
|
| 24 |
import numpy as np
|
| 25 |
from hydra.utils import instantiate
|
| 26 |
+
# from modelscope import snapshot_download
|
| 27 |
+
from huggingface_hub import snapshot_download
|
| 28 |
from omegaconf import OmegaConf
|
| 29 |
from PIL import Image
|
| 30 |
|
|
|
|
| 58 |
self, local_dir: str = "weights/sam-3d-objects", compile: bool = False
|
| 59 |
) -> None:
|
| 60 |
if not os.path.exists(local_dir):
|
| 61 |
+
# snapshot_download("facebook/sam-3d-objects", local_dir=local_dir)
|
| 62 |
+
snapshot_download("jetjodh/sam-3d-objects", local_dir=local_dir)
|
| 63 |
config_file = os.path.join(local_dir, "checkpoints/pipeline.yaml")
|
| 64 |
config = OmegaConf.load(config_file)
|
| 65 |
config.rendering_engine = "nvdiffrast"
|