Spaces:
Running
on
Zero
Running
on
Zero
Update freesplatter/webui/tab_img_to_3d.py
Browse files
freesplatter/webui/tab_img_to_3d.py
CHANGED
@@ -5,7 +5,7 @@ from .gradio_custommodel3d import CustomModel3D
|
|
5 |
from .gradio_customgs import CustomGS
|
6 |
|
7 |
|
8 |
-
def create_interface_img_to_3d(
|
9 |
default_views = {
|
10 |
'Zero123++ v1.1': ['Input', 'V2', 'V3', 'V5'],
|
11 |
'Zero123++ v1.2': ['V1', 'V2', 'V3', 'V5', 'V6'],
|
@@ -137,14 +137,8 @@ def create_interface_img_to_3d(segmentation_api, freesplatter_api, model='Zero12
|
|
137 |
)
|
138 |
|
139 |
var_dict['run_btn'].click(
|
140 |
-
fn=
|
141 |
-
inputs=var_dict['in_image'],
|
142 |
-
outputs=var_dict['fg_image'],
|
143 |
-
concurrency_id='default_group',
|
144 |
-
api_name='run_segmentation',
|
145 |
-
).success(
|
146 |
-
fn=partial(freesplatter_api, cache_dir=interface.GRADIO_CACHE),
|
147 |
-
inputs=[var_dict['fg_image'],
|
148 |
var_dict['model'],
|
149 |
var_dict['diffusion_steps'],
|
150 |
var_dict['guidance_scale'],
|
@@ -152,7 +146,7 @@ def create_interface_img_to_3d(segmentation_api, freesplatter_api, model='Zero12
|
|
152 |
var_dict['view_indices'],
|
153 |
var_dict['gs_type'],
|
154 |
var_dict['mesh_reduction']],
|
155 |
-
outputs=[var_dict['out_multiview'], var_dict['
|
156 |
concurrency_id='default_group',
|
157 |
api_name='run_image_to_3d',
|
158 |
)
|
|
|
5 |
from .gradio_customgs import CustomGS
|
6 |
|
7 |
|
8 |
+
def create_interface_img_to_3d(freesplatter_api, model='Zero123++ v1.2'):
|
9 |
default_views = {
|
10 |
'Zero123++ v1.1': ['Input', 'V2', 'V3', 'V5'],
|
11 |
'Zero123++ v1.2': ['V1', 'V2', 'V3', 'V5', 'V6'],
|
|
|
137 |
)
|
138 |
|
139 |
var_dict['run_btn'].click(
|
140 |
+
fn=freesplatter_api,
|
141 |
+
inputs=[var_dict['in_image'],
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
var_dict['model'],
|
143 |
var_dict['diffusion_steps'],
|
144 |
var_dict['guidance_scale'],
|
|
|
146 |
var_dict['view_indices'],
|
147 |
var_dict['gs_type'],
|
148 |
var_dict['mesh_reduction']],
|
149 |
+
outputs=[var_dict['fg_image'], var_dict['out_multiview'], var_dict['out_pose'], var_dict['out_gs_vis'], var_dict['out_video'], var_dict['out_mesh']],
|
150 |
concurrency_id='default_group',
|
151 |
api_name='run_image_to_3d',
|
152 |
)
|