Spaces:
Paused
Paused
Update app.py
Browse files6 unmodified lines789101112137 unmodified lines2122232425262728293031323334353637383940414243444546474849505152536 unmodified linespipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)pipe.enable_model_cpu_offload()def infer(prompt, num_inference_steps):#prompt = "Darth Vader is surfing on waves"video_frames = pipe(prompt, num_inference_steps=40, height=320, width=576, num_frames=24).framesvideo_path = export_to_video(video_frames)7 unmodified lineswith gr.Blocks(css=css) as demo:with gr.Column(elem_id="col-container"):gr.HTML("""<div style="text-align: center; max-width: 700px; margin: 0 auto;"><divstyle="display: inline-flex;align-items: center;gap: 0.8rem;font-size: 1.75rem;"><h1 style="font-weight: 900; margin-bottom: 7px; margin-top: 5px;">Zeroscope Text-to-Video</h1></div><p style="margin-bottom: 10px; font-size: 94%">A watermark-free Modelscope-based video model optimized for producing high-quality 16:9 compositions and a smooth video output. <br />This model was trained using 9,923 clips and 29,769 tagged frames at 24 frames, 576x320 resolution.[](https://huggingface.co/spaces/fffiloni/zeroscope?duplicate=true)</p></div>""")prompt_in = gr.Textbox(label="Prompt", placeholder="Darth Vader is surfing on waves")inference_steps = gr.Slider(label="Inference Steps", minimum=10, maximum=100, step=1, value=40, interactive=False)submit_btn = gr.Button("Submit")video_result = gr.Video(label="Video Output")submit_btn.click(fn=infer,inputs=[prompt_in, inference_steps],outputs=[video_result])demo.queue(max_size=12).launch()6 unmodified lines789101112137 unmodified lines2122232425262728293031323334353637383940414243446 unmodified linespipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)pipe.enable_model_cpu_offload()def infer(prompt):#prompt = "Darth Vader is surfing on waves"video_frames = pipe(prompt, num_inference_steps=40, height=320, width=576, num_frames=24).framesvideo_path = export_to_video(video_frames)7 unmodified lineswith gr.Blocks(css=css) as demo:with gr.Column(elem_id="col-container"):gr.Mardown("""# Zeroscope Text-to-VideoA watermark-free Modelscope-based video model optimized for producing high-quality 16:9 compositions and a smooth video output. <br />This model was trained using 9,923 clips and 29,769 tagged frames at 24 frames, 576x320 resolution.[](https://huggingface.co/spaces/fffiloni/zeroscope?duplicate=true)""")prompt_in = gr.Textbox(label="Prompt", placeholder="Darth Vader is surfing on waves")#inference_steps = gr.Slider(label="Inference Steps", minimum=10, maximum=100, step=1, value=40, interactive=False)submit_btn = gr.Button("Submit")video_result = gr.Video(label="Video Output")submit_btn.click(fn=infer,inputs=[prompt_in],outputs=[video_result])demo.queue(max_size=12).launch()
app.py+13-22