Spaces:
Configuration error
Configuration error
Update app.py
Browse files
app.py
CHANGED
|
@@ -54,6 +54,7 @@ def process_image(
|
|
| 54 |
processing_res=default_image_processing_res,
|
| 55 |
reproducible=default_image_reproducuble,
|
| 56 |
):
|
|
|
|
| 57 |
input_image = Image.open(path_input)
|
| 58 |
|
| 59 |
pipe_out = pipe(
|
|
@@ -99,6 +100,7 @@ def process_video(
|
|
| 99 |
out_max_frames=default_video_out_max_frames,
|
| 100 |
progress=gr.Progress(),
|
| 101 |
):
|
|
|
|
| 102 |
path_output_dir = os.path.splitext(path_input)[0] + "_output"
|
| 103 |
os.makedirs(path_output_dir, exist_ok=True)
|
| 104 |
|
|
@@ -201,6 +203,7 @@ def process_bas(
|
|
| 201 |
frame_near=default_bas_frame_near,
|
| 202 |
frame_far=default_bas_frame_far,
|
| 203 |
):
|
|
|
|
| 204 |
if plane_near >= plane_far:
|
| 205 |
raise gr.Error("NEAR plane must have a value smaller than the FAR plane")
|
| 206 |
|
|
@@ -813,7 +816,6 @@ def main():
|
|
| 813 |
|
| 814 |
pipe = pipe.to(device)
|
| 815 |
pipe.unet = pipe.unet.cuda()
|
| 816 |
-
pipe._encode_empty_text()
|
| 817 |
prefetch_hf_cache(pipe)
|
| 818 |
run_demo_server(pipe)
|
| 819 |
|
|
|
|
| 54 |
processing_res=default_image_processing_res,
|
| 55 |
reproducible=default_image_reproducuble,
|
| 56 |
):
|
| 57 |
+
pipe._encode_empty_text()
|
| 58 |
input_image = Image.open(path_input)
|
| 59 |
|
| 60 |
pipe_out = pipe(
|
|
|
|
| 100 |
out_max_frames=default_video_out_max_frames,
|
| 101 |
progress=gr.Progress(),
|
| 102 |
):
|
| 103 |
+
pipe._encode_empty_text()
|
| 104 |
path_output_dir = os.path.splitext(path_input)[0] + "_output"
|
| 105 |
os.makedirs(path_output_dir, exist_ok=True)
|
| 106 |
|
|
|
|
| 203 |
frame_near=default_bas_frame_near,
|
| 204 |
frame_far=default_bas_frame_far,
|
| 205 |
):
|
| 206 |
+
pipe._encode_empty_text()
|
| 207 |
if plane_near >= plane_far:
|
| 208 |
raise gr.Error("NEAR plane must have a value smaller than the FAR plane")
|
| 209 |
|
|
|
|
| 816 |
|
| 817 |
pipe = pipe.to(device)
|
| 818 |
pipe.unet = pipe.unet.cuda()
|
|
|
|
| 819 |
prefetch_hf_cache(pipe)
|
| 820 |
run_demo_server(pipe)
|
| 821 |
|