Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -189,7 +189,6 @@ def run_demo_server(pipe):
|
|
189 |
]
|
190 |
|
191 |
def submit_depth_fn(*args):
|
192 |
-
print('args')
|
193 |
out = list(process_pipe(*args))
|
194 |
out = [gr.Button(interactive=False), gr.Image(interactive=False)] + out
|
195 |
return out
|
@@ -277,7 +276,28 @@ def main():
|
|
277 |
|
278 |
pipe = pipe.to(device)
|
279 |
|
280 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
|
282 |
|
283 |
if __name__ == "__main__":
|
|
|
189 |
]
|
190 |
|
191 |
def submit_depth_fn(*args):
|
|
|
192 |
out = list(process_pipe(*args))
|
193 |
out = [gr.Button(interactive=False), gr.Image(interactive=False)] + out
|
194 |
return out
|
|
|
276 |
|
277 |
pipe = pipe.to(device)
|
278 |
|
279 |
+
input_image = Image.open('files/bee.jpg')
|
280 |
+
|
281 |
+
pipe_out = pipe(
|
282 |
+
input_image,
|
283 |
+
denoising_steps=denoise_steps,
|
284 |
+
ensemble_size=ensemble_size,
|
285 |
+
processing_res=processing_res,
|
286 |
+
batch_size=1 if processing_res == 0 else 0,
|
287 |
+
guidance_scale=3,
|
288 |
+
domain="indoor",
|
289 |
+
show_progress_bar=True,
|
290 |
+
)
|
291 |
+
|
292 |
+
depth_pred: np.ndarray = pipe_out.depth_np
|
293 |
+
depth_colored: Image.Image = pipe_out.depth_colored
|
294 |
+
normal_pred: np.ndarray = pipe_out.normal_np
|
295 |
+
normal_colored: Image.Image = pipe_out.normal_colored
|
296 |
+
|
297 |
+
print(depth_pred.shape)
|
298 |
+
print(normal_pred.shape)
|
299 |
+
|
300 |
+
# run_demo_server(pipe)
|
301 |
|
302 |
|
303 |
if __name__ == "__main__":
|