Spaces:
Runtime error
Runtime error
Update freesplatter/webui/runner.py
Browse files
freesplatter/webui/runner.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import os
|
| 2 |
import json
|
| 3 |
import uuid
|
|
@@ -78,7 +79,7 @@ class FreeSplatterRunner:
|
|
| 78 |
"briaai/RMBG-2.0",
|
| 79 |
trust_remote_code=True,
|
| 80 |
cache_dir='ckpts/',
|
| 81 |
-
)
|
| 82 |
self.rembg.eval()
|
| 83 |
|
| 84 |
# diffusion models
|
|
@@ -162,6 +163,7 @@ class FreeSplatterRunner:
|
|
| 162 |
|
| 163 |
return image
|
| 164 |
|
|
|
|
| 165 |
def run_img_to_3d(
|
| 166 |
self,
|
| 167 |
image_rgba,
|
|
@@ -238,7 +240,8 @@ class FreeSplatterRunner:
|
|
| 238 |
images, alphas, legends=legends, gs_type=gs_type, mesh_reduction=mesh_reduction)
|
| 239 |
|
| 240 |
return images_vis, gs_vis_path, video_path, mesh_fine_path, fig
|
| 241 |
-
|
|
|
|
| 242 |
def run_views_to_3d(
|
| 243 |
self,
|
| 244 |
image_files,
|
|
@@ -459,6 +462,7 @@ class FreeSplatterRunner:
|
|
| 459 |
return fig
|
| 460 |
|
| 461 |
# FreeSplatter-S
|
|
|
|
| 462 |
def run_views_to_scene(
|
| 463 |
self,
|
| 464 |
image1,
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
import os
|
| 3 |
import json
|
| 4 |
import uuid
|
|
|
|
| 79 |
"briaai/RMBG-2.0",
|
| 80 |
trust_remote_code=True,
|
| 81 |
cache_dir='ckpts/',
|
| 82 |
+
)
|
| 83 |
self.rembg.eval()
|
| 84 |
|
| 85 |
# diffusion models
|
|
|
|
| 163 |
|
| 164 |
return image
|
| 165 |
|
| 166 |
+
@spaces.GPU
|
| 167 |
def run_img_to_3d(
|
| 168 |
self,
|
| 169 |
image_rgba,
|
|
|
|
| 240 |
images, alphas, legends=legends, gs_type=gs_type, mesh_reduction=mesh_reduction)
|
| 241 |
|
| 242 |
return images_vis, gs_vis_path, video_path, mesh_fine_path, fig
|
| 243 |
+
|
| 244 |
+
@spaces.GPU
|
| 245 |
def run_views_to_3d(
|
| 246 |
self,
|
| 247 |
image_files,
|
|
|
|
| 462 |
return fig
|
| 463 |
|
| 464 |
# FreeSplatter-S
|
| 465 |
+
@spaces.GPU
|
| 466 |
def run_views_to_scene(
|
| 467 |
self,
|
| 468 |
image1,
|