| 427 | return False |
| 428 | |
| 429 | def create_diffusing_tab (): |
| 430 | global diffuseimg |
| 431 | with gr.Column(visible=True, elem_id="Processid") as second_panel: |
| 432 | dummy_component = gr.Label(visible=False) |
| 433 | with gr.Row(): |
| 434 | with gr.Tabs(elem_id="mode_TemporalKit"): |
| 435 | with gr.Row(): |
| 436 | with gr.Tab(elem_id="input_diffuse", label="Generate"): |
| 437 | with gr.Column(): |
| 438 | with gr.Row(): |
| 439 | input_image = gr.Image(label="Input_Image", elem_id="input_page2") |
| 440 | input_video = gr.Video(label="Input Video", elem_id="input_videopage2") |
| 441 | with gr.Row(): |
| 442 | read_last_settings = gr.Button("read_last_settings", elem_id="read_last_settings") |
| 443 | read_last_image = gr.Button("read_last_image", elem_id="read_last_image") |
| 444 | with gr.Row(): |
| 445 | fps = gr.Number(label="FPS",value=10,precision=1) |
| 446 | per_side = gr.Number(label="per side",value=3,precision=1) |
| 447 | output_resolution_single = gr.Number(label="output height resolution",value=1024,precision=1) |
| 448 | batch_size_diffuse = gr.Number(label="batch size",value=10,precision=1) |
| 449 | with gr.Row(): |
| 450 | runButton = gr.Button("run", elem_id="run_button") |
| 451 | |
| 452 | |
| 453 | with gr.Tabs(elem_id="mode_TemporalKit"): |
| 454 | with gr.Row(): |
| 455 | with gr.Tab(elem_id="input_diffuse", label="Output"): |
| 456 | with gr.Column(): |
| 457 | #newbutton = gr.Button("update", elem_id="update_button") |
| 458 | outputfile = gr.Video() |
| 459 | |
| 460 | read_last_image.click( |
| 461 | fn=update_image, |
| 462 | outputs=input_image |
| 463 | ) |
| 464 | read_last_settings.click( |
| 465 | fn=update_settings, |
| 466 | outputs=[fps,per_side,batch_size_diffuse,input_video] |
| 467 | ) |
| 468 | runButton.click( |
| 469 | fn=apply_image_to_video, |
| 470 | inputs=[input_image, input_video,fps,per_side,output_resolution_single,batch_size_diffuse], |
| 471 | outputs=outputfile |
| 472 | ) |
| 473 | |
| 474 | |
| 475 | def create_batch_tab (): |