Spaces:
Paused
Paused
test
Browse files298 unmodified lines29930030130230330421 unmodified lines326327328329330331332333334335336337338339340341342343298 unmodified linesreturn video_path, video_path, current_seedwith gr.Blocks() as demo:gr.Markdown("# WAMU - Wan 2.2 I2V (14B)")gr.Markdown("## ℹ️ **A Note on Performance:** This version prioritizes a straightforward setup over maximum speed, so performance may vary.")21 unmodified lines)flow_shift_slider = gr.Slider(minimum=0.5, maximum=15.0, step=0.1, value=3.0, label="Flow Shift")generate_button = gr.Button("Generate Video", variant="primary")with gr.Column():video_output = gr.Video(label="Generated Video", autoplay=True, interactive=False)file_output = gr.File(label="Download Video")ui_inputs = [input_image_component, last_image_component, prompt_input, steps_slider,negative_prompt_input, duration_seconds_input,guidance_scale_input, guidance_scale_2_input, seed_input, randomize_seed_checkbox,quality_slider, scheduler_dropdown, flow_shift_slider,]generate_button.click(fn=generate_video, inputs=ui_inputs, outputs=[video_output, file_output, seed_input])if __name__ == "__main__":298 unmodified lines29930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933021 unmodified lines352353354355356357358359360361362363364365366367368369370371372373374375376377378298 unmodified linesreturn video_path, video_path, current_seeddef visibility_interpolation():return (gr.update(visible=True),gr.update(visible=True))def interpolate_video(generated_video, multiplier, request: gr.Request):x_ip_token = request.headers['x-ip-token']client = Client("r3gm/FPS_Enhancer", headers={"x-ip-token": x_ip_token})result = client.predict(input_video=handle_file(generated_video),frame_multiplier="2",time_exponent=1,fixed_fps=0,video_scale="1",remove_duplicate_frames=False,create_montage=False,api_name="/run_rife")return result[0]["filepath"]def generate_interpolate(generated_video, multiplier, request: gr.Request):return interpolate_video(generated_video, multiplier, request)with gr.Blocks() as demo:gr.Markdown("# WAMU - Wan 2.2 I2V (14B)")gr.Markdown("## ℹ️ **A Note on Performance:** This version prioritizes a straightforward setup over maximum speed, so performance may vary.")21 unmodified lines)flow_shift_slider = gr.Slider(minimum=0.5, maximum=15.0, step=0.1, value=3.0, label="Flow Shift")frame_multi = gr.Number(minimum=2, maximum=6, step=1, value=2, label="Frame Multiplier for 'Interpolate video'",info="2X = Double FPS (e.g. 16 -> 32). Higher multipliers create more intermediate frames.")generate_button = gr.Button("Generate Video", variant="primary")with gr.Column():video_output = gr.Video(label="Generated Video", autoplay=True, interactive=False)file_output = gr.File(label="Download Video")frame_button = gr.Button("Interpolate video", variant="secondary", visible=False)frame_output = gr.File(label="Interpolated video", visible=False)ui_inputs = [input_image_component, last_image_component, prompt_input, steps_slider,negative_prompt_input, duration_seconds_input,guidance_scale_input, guidance_scale_2_input, seed_input, randomize_seed_checkbox,quality_slider, scheduler_dropdown, flow_shift_slider,]generate_button.click(fn=generate_video, inputs=ui_inputs, outputs=[video_output, file_output, seed_input]).success(visibility_interpolation, [], [frame_button, frame_output])frame_button.click(fn=generate_interpolate, inputs=[file_output, frame_multi], outputs=[frame_output])if __name__ == "__main__":
app.py+36-1