JiantaoLin
commited on
Commit
·
0067ad0
1
Parent(s):
8270c24
new
Browse files
app.py
CHANGED
@@ -211,9 +211,10 @@ def image2mesh_main_(reference_3d_bundle_image, caption, seed, strength1=0.5, st
|
|
211 |
video_path = recon_mesh_path.replace('.obj','.mp4').replace('.glb','.mp4')
|
212 |
render_video_from_obj(recon_mesh_path, video_path)
|
213 |
print(f"After bundle_image_to_mesh: {torch.cuda.memory_allocated() / 1024**3} GB")
|
214 |
-
return gen_save_path, video_path
|
215 |
else:
|
216 |
-
return gen_save_path, recon_mesh_path
|
|
|
217 |
|
218 |
@spaces.GPU(duration=120)
|
219 |
def bundle_image_to_mesh(
|
@@ -242,9 +243,9 @@ def bundle_image_to_mesh(
|
|
242 |
video_path = recon_mesh_path.replace('.obj','.mp4').replace('.glb','.mp4')
|
243 |
render_video_from_obj(recon_mesh_path, video_path)
|
244 |
print(f"After bundle_image_to_mesh: {torch.cuda.memory_allocated() / 1024**3} GB")
|
245 |
-
return video_path
|
246 |
else:
|
247 |
-
return recon_mesh_path
|
248 |
|
249 |
_HEADER_=f"""
|
250 |
<img src="{LOGO_PATH}">
|
|
|
211 |
video_path = recon_mesh_path.replace('.obj','.mp4').replace('.glb','.mp4')
|
212 |
render_video_from_obj(recon_mesh_path, video_path)
|
213 |
print(f"After bundle_image_to_mesh: {torch.cuda.memory_allocated() / 1024**3} GB")
|
214 |
+
return gen_save_path, video_path, mesh_cache
|
215 |
else:
|
216 |
+
return gen_save_path, recon_mesh_path, mesh_cache
|
217 |
+
# return gen_save_path, recon_mesh_path
|
218 |
|
219 |
@spaces.GPU(duration=120)
|
220 |
def bundle_image_to_mesh(
|
|
|
243 |
video_path = recon_mesh_path.replace('.obj','.mp4').replace('.glb','.mp4')
|
244 |
render_video_from_obj(recon_mesh_path, video_path)
|
245 |
print(f"After bundle_image_to_mesh: {torch.cuda.memory_allocated() / 1024**3} GB")
|
246 |
+
return video_path, mesh_cache
|
247 |
else:
|
248 |
+
return recon_mesh_path, mesh_cache
|
249 |
|
250 |
_HEADER_=f"""
|
251 |
<img src="{LOGO_PATH}">
|