Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,18 +7,18 @@ from huggingface_hub import hf_hub_download
|
|
7 |
|
8 |
from lrm.inferrer import LRMInferrer
|
9 |
|
10 |
-
def prepare_checkpoint(model_name: str):
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
19 |
-
|
20 |
|
21 |
-
|
22 |
|
23 |
def assert_input_image(input_image):
|
24 |
if input_image is None:
|
@@ -68,13 +68,13 @@ def demo_image_to_video(inferrer: LRMInferrer):
|
|
68 |
_DESCRIPTION = '''
|
69 |
<div>
|
70 |
<a style="display:inline-block" href='https://github.com/3DTopia/OpenLRM'><img src='https://img.shields.io/github/stars/3DTopia/OpenLRM?style=social'/></a>
|
71 |
-
<a style="display:inline-block; margin-left: .5em" href="https://huggingface.co/zxhezexin
|
72 |
</div>
|
73 |
OpenLRM is an open-source implementation of Large Reconstruction Models.
|
74 |
|
75 |
<strong>Image-to-3D in 10 seconds!</strong>
|
76 |
|
77 |
-
<strong>Disclaimer:</strong> This demo uses `
|
78 |
'''
|
79 |
|
80 |
with gr.Blocks(analytics_enabled=False) as iface:
|
@@ -157,9 +157,9 @@ def demo_image_to_video(inferrer: LRMInferrer):
|
|
157 |
|
158 |
if __name__ == "__main__":
|
159 |
|
160 |
-
model_name = "
|
161 |
|
162 |
-
prepare_checkpoint(model_name)
|
163 |
|
164 |
with LRMInferrer(model_name) as inferrer:
|
165 |
iface = demo_image_to_video(inferrer)
|
|
|
7 |
|
8 |
from lrm.inferrer import LRMInferrer
|
9 |
|
10 |
+
# def prepare_checkpoint(model_name: str):
|
11 |
|
12 |
+
# REPO_ID = f"zxhezexin/OpenLRM"
|
13 |
+
# FILE_NAME = f"{model_name}.pth"
|
14 |
+
# CACHE_PATH = f".cache"
|
15 |
|
16 |
+
# print(f"Downloading ckpt ...")
|
17 |
|
18 |
+
# ckpt_path = hf_hub_download(repo_id=REPO_ID, filename=FILE_NAME, local_dir=CACHE_PATH)
|
19 |
+
# print(f"checkpoint path is {ckpt_path}")
|
20 |
|
21 |
+
# print(f"Downloaded ckpt into {CACHE_PATH}")
|
22 |
|
23 |
def assert_input_image(input_image):
|
24 |
if input_image is None:
|
|
|
68 |
_DESCRIPTION = '''
|
69 |
<div>
|
70 |
<a style="display:inline-block" href='https://github.com/3DTopia/OpenLRM'><img src='https://img.shields.io/github/stars/3DTopia/OpenLRM?style=social'/></a>
|
71 |
+
<a style="display:inline-block; margin-left: .5em" href="https://huggingface.co/zxhezexin"><img src='https://img.shields.io/badge/Model-Weights-blue'/></a>
|
72 |
</div>
|
73 |
OpenLRM is an open-source implementation of Large Reconstruction Models.
|
74 |
|
75 |
<strong>Image-to-3D in 10 seconds!</strong>
|
76 |
|
77 |
+
<strong>Disclaimer:</strong> This demo uses `openlrm-base-obj-1.0` model trained on Objaverse only, which consists of synthetic data. Its performance may decrease on in-the-wild images. We use 194x194 rendering resolution here for a quick demonstration.
|
78 |
'''
|
79 |
|
80 |
with gr.Blocks(analytics_enabled=False) as iface:
|
|
|
157 |
|
158 |
if __name__ == "__main__":
|
159 |
|
160 |
+
model_name = "openlrm-base-obj-1.0"
|
161 |
|
162 |
+
# prepare_checkpoint(model_name)
|
163 |
|
164 |
with LRMInferrer(model_name) as inferrer:
|
165 |
iface = demo_image_to_video(inferrer)
|