Spaces:
Running
on
Zero
Running
on
Zero
fix video input
Browse files
app.py
CHANGED
@@ -584,7 +584,7 @@ def ncut_run(
|
|
584 |
progress(0.8, desc="Saving Video")
|
585 |
video_path = get_random_path()
|
586 |
video_cache.add_video(video_path)
|
587 |
-
pil_images_to_video(to_pil_images(rgb), video_path)
|
588 |
return video_path, logging_str
|
589 |
|
590 |
|
@@ -982,8 +982,8 @@ def make_input_video_section():
|
|
982 |
# gr.Markdown('### Input Video')
|
983 |
input_gallery = gr.Video(value=None, label="Select video", elem_id="video-input", height="auto", show_share_button=False, interactive=True)
|
984 |
gr.Markdown('_image backbone model is used to extract features from each frame, NCUT is computed on all frames_')
|
985 |
-
|
986 |
-
max_frames_number = gr.Slider(1, 200, step=1, label="Max frames", value=100, elem_id="max_frames")
|
987 |
submit_button = gr.Button("🔴 RUN", elem_id="submit_button", variant='primary')
|
988 |
clear_images_button = gr.Button("🗑️Clear", elem_id='clear_button', variant='stop')
|
989 |
return input_gallery, submit_button, clear_images_button, max_frames_number
|
@@ -1471,7 +1471,7 @@ with demo:
|
|
1471 |
submit_button.click(
|
1472 |
run_fn,
|
1473 |
inputs=[
|
1474 |
-
|
1475 |
positive_prompt, negative_prompt,
|
1476 |
false_placeholder, no_prompt, no_prompt, no_prompt,
|
1477 |
affinity_focal_gamma_slider, num_sample_ncut_slider, knn_ncut_slider,
|
|
|
584 |
progress(0.8, desc="Saving Video")
|
585 |
video_path = get_random_path()
|
586 |
video_cache.add_video(video_path)
|
587 |
+
pil_images_to_video(to_pil_images(rgb), video_path, fps=5)
|
588 |
return video_path, logging_str
|
589 |
|
590 |
|
|
|
982 |
# gr.Markdown('### Input Video')
|
983 |
input_gallery = gr.Video(value=None, label="Select video", elem_id="video-input", height="auto", show_share_button=False, interactive=True)
|
984 |
gr.Markdown('_image backbone model is used to extract features from each frame, NCUT is computed on all frames_')
|
985 |
+
max_frames_number = gr.Number(100, label="Max frames", elem_id="max_frames")
|
986 |
+
# max_frames_number = gr.Slider(1, 200, step=1, label="Max frames", value=100, elem_id="max_frames")
|
987 |
submit_button = gr.Button("🔴 RUN", elem_id="submit_button", variant='primary')
|
988 |
clear_images_button = gr.Button("🗑️Clear", elem_id='clear_button', variant='stop')
|
989 |
return input_gallery, submit_button, clear_images_button, max_frames_number
|
|
|
1471 |
submit_button.click(
|
1472 |
run_fn,
|
1473 |
inputs=[
|
1474 |
+
video_input_gallery, model_dropdown, layer_slider, num_eig_slider, node_type_dropdown,
|
1475 |
positive_prompt, negative_prompt,
|
1476 |
false_placeholder, no_prompt, no_prompt, no_prompt,
|
1477 |
affinity_focal_gamma_slider, num_sample_ncut_slider, knn_ncut_slider,
|