Spaces:
Sleeping
Sleeping
Anonymous
commited on
Commit
•
9c4bb92
1
Parent(s):
e0aa9bd
fix app
Browse files
app.py
CHANGED
@@ -28,11 +28,7 @@ hf_hub_download(repo_id="VideoCrafter/Text2Video-1024", filename="model.ckpt", l
|
|
28 |
# hf_hub_download(repo_id="MoonQiu/LongerCrafter", filename="model.pth", local_dir=ckpt_dir_256)
|
29 |
|
30 |
|
31 |
-
def infer(prompt, output_size, seed):
|
32 |
-
num_frames = 32
|
33 |
-
ddim_steps = 50
|
34 |
-
unconditional_guidance_scale = 12.0
|
35 |
-
save_fps = 10
|
36 |
window_size = 16
|
37 |
window_stride = 4
|
38 |
|
@@ -258,6 +254,28 @@ with gr.Blocks(css=css) as demo:
|
|
258 |
with gr.Row():
|
259 |
output_size = gr.Dropdown(["576x1024"], value="576x1024", label="Output Size (around 1800s for 576x1024)")
|
260 |
# output_size = gr.Dropdown(["576x1024", "256x256"], value="576x1024", label="Output Size", info="576x1024 is watermark-free")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
with gr.Row():
|
262 |
seed = gr.Slider(label='Random Seed',
|
263 |
minimum=0,
|
@@ -268,10 +286,10 @@ with gr.Blocks(css=css) as demo:
|
|
268 |
submit_btn = gr.Button("Generate")
|
269 |
video_result = gr.Video(label="Video Output")
|
270 |
|
271 |
-
gr.Examples(examples=examples, inputs=[prompt_in, output_size, seed])
|
272 |
|
273 |
submit_btn.click(fn=infer,
|
274 |
-
inputs=[prompt_in, output_size, seed],
|
275 |
outputs=[video_result],
|
276 |
api_name="zrscp")
|
277 |
|
|
|
28 |
# hf_hub_download(repo_id="MoonQiu/LongerCrafter", filename="model.pth", local_dir=ckpt_dir_256)
|
29 |
|
30 |
|
31 |
+
def infer(prompt, output_size, seed, num_frames, ddim_steps, unconditional_guidance_scale, save_fps):
|
|
|
|
|
|
|
|
|
32 |
window_size = 16
|
33 |
window_stride = 4
|
34 |
|
|
|
254 |
with gr.Row():
|
255 |
output_size = gr.Dropdown(["576x1024"], value="576x1024", label="Output Size (around 1800s for 576x1024)")
|
256 |
# output_size = gr.Dropdown(["576x1024", "256x256"], value="576x1024", label="Output Size", info="576x1024 is watermark-free")
|
257 |
+
with gr.Row():
|
258 |
+
num_frames = gr.Slider(label='Frames',
|
259 |
+
minimum=16,
|
260 |
+
maximum=32,
|
261 |
+
step=4,
|
262 |
+
value=32)
|
263 |
+
ddim_steps = gr.Slider(label='DDIM Steps',
|
264 |
+
minimum=1,
|
265 |
+
maximum=1000,
|
266 |
+
step=1,
|
267 |
+
value=50)
|
268 |
+
with gr.Row():
|
269 |
+
unconditional_guidance_scale = gr.Slider(label='Unconditional Guidance Scale',
|
270 |
+
minimum=0,
|
271 |
+
maximum=50,
|
272 |
+
step=1,
|
273 |
+
value=12)
|
274 |
+
save_fps = gr.Slider(label='Save FPS',
|
275 |
+
minimum=1,
|
276 |
+
maximum=30,
|
277 |
+
step=1,
|
278 |
+
value=10)
|
279 |
with gr.Row():
|
280 |
seed = gr.Slider(label='Random Seed',
|
281 |
minimum=0,
|
|
|
286 |
submit_btn = gr.Button("Generate")
|
287 |
video_result = gr.Video(label="Video Output")
|
288 |
|
289 |
+
gr.Examples(examples=examples, inputs=[prompt_in, output_size, seed, num_frames, ddim_steps, unconditional_guidance_scale, save_fps])
|
290 |
|
291 |
submit_btn.click(fn=infer,
|
292 |
+
inputs=[prompt_in, output_size, seed, num_frames, ddim_steps, unconditional_guidance_scale, save_fps],
|
293 |
outputs=[video_result],
|
294 |
api_name="zrscp")
|
295 |
|