Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -136,20 +136,20 @@ def image_to_3d(
|
|
136 |
str: The path to the video of the 3D model.
|
137 |
"""
|
138 |
user_dir = os.path.join(TMP_DIR, str(req.session_hash))
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
video = render_utils.render_video(outputs['gaussian'][0], num_frames=120)['color']
|
154 |
video_geo = render_utils.render_video(outputs['mesh'][0], num_frames=120)['normal']
|
155 |
video = [np.concatenate([video[i], video_geo[i]], axis=1) for i in range(len(video))]
|
|
|
136 |
str: The path to the video of the 3D model.
|
137 |
"""
|
138 |
user_dir = os.path.join(TMP_DIR, str(req.session_hash))
|
139 |
+
outputs = pipeline.run(
|
140 |
+
image,
|
141 |
+
seed=seed,
|
142 |
+
formats=["gaussian", "mesh"],
|
143 |
+
preprocess_image=False,
|
144 |
+
sparse_structure_sampler_params={
|
145 |
+
"steps": ss_sampling_steps,
|
146 |
+
"cfg_strength": ss_guidance_strength,
|
147 |
+
},
|
148 |
+
slat_sampler_params={
|
149 |
+
"steps": slat_sampling_steps,
|
150 |
+
"cfg_strength": slat_guidance_strength,
|
151 |
+
},
|
152 |
+
)
|
153 |
video = render_utils.render_video(outputs['gaussian'][0], num_frames=120)['color']
|
154 |
video_geo = render_utils.render_video(outputs['mesh'][0], num_frames=120)['normal']
|
155 |
video = [np.concatenate([video[i], video_geo[i]], axis=1) for i in range(len(video))]
|