Spaces:
Running
on
Zero
Running
on
Zero
gradual improvements
Browse files
app.py
CHANGED
@@ -290,7 +290,7 @@ def call_pipe(
|
|
290 |
def main():
|
291 |
# Define the interface inputs
|
292 |
|
293 |
-
with gr.Blocks(css=".gradio-container { max-width: 80vw; margin: 0 auto; }, /* Target all media elements (img, video, audio) within table cells */ tr td img, tr td video, tr td audio { max-height:
|
294 |
with gr.Group():
|
295 |
gr.Markdown("""# HunyuanVideo Keyframe Control Lora for Video Generation
|
296 |
**Generate videos using the HunyuanVideo model with a prompt and two (or more) frames as conditions. Gradio / HF Spaces implementation demo.**
|
@@ -306,7 +306,7 @@ def main():
|
|
306 |
|
307 |
|
308 |
with gr.Row():
|
309 |
-
with gr.Column():
|
310 |
with gr.Row():
|
311 |
prompt_textbox = gr.Textbox(label="Prompt", value="a subject ...", scale=2)
|
312 |
resolution = gr.Dropdown(
|
@@ -320,19 +320,12 @@ def main():
|
|
320 |
guidance_scale = gr.Slider(minimum=0.1, maximum=20, step=0.1, label="Guidance Scale", value=6.0)
|
321 |
num_frames = gr.Slider(minimum=1, maximum=129, step=1, label="Number of Frames", value=49)
|
322 |
generate_button = gr.Button("Generate Video")
|
323 |
-
with gr.Column():
|
324 |
outputs = gr.Video(label="Generated Video")
|
325 |
with gr.Accordion(label="Examples"):
|
326 |
gr.Markdown("""
|
327 |
<div>
|
328 |
-
|
329 |
-
| Starting Frame | End Frame | Generated Video |
|
330 |
-
|---------|---------|-----------------|
|
331 |
-
| <img src="https://content.dashtoon.ai/stability-images/41aeca63-064a-4003-8c8b-bfe2cc80d275.png" > |  | <video controls autoplay src="https://content.dashtoon.ai/stability-images/14b7dd1a-1f46-4c4c-b4ec-9d0f948712af.mp4"></video> |
|
332 |
-
|  |  | <video controls autoplay src="https://content.dashtoon.ai/stability-images/b00ba193-b3b7-41a1-9bc1-9fdaceba6efa.mp4"></video> |
|
333 |
-
|  |  | <video controls autoplay src="https://content.dashtoon.ai/stability-images/0cb84780-4fdf-4ecc-ab48-12e7e1055a39.mp4"></video> |
|
334 |
-
|  |  | <video controls autoplay src="https://content.dashtoon.ai/stability-images/ce12156f-0ac2-4d16-b489-37e85c61b5b2.mp4"></video> |
|
335 |
-
|
336 |
</div>
|
337 |
""", sanitize_html=False)
|
338 |
with gr.Accordion():
|
|
|
290 |
def main():
|
291 |
# Define the interface inputs
|
292 |
|
293 |
+
with gr.Blocks(css=".gradio-container { max-width: 80vw; margin: 0 auto; }, /* Target all media elements (img, video, audio) within table cells */ tr td img, tr td video, tr td audio { max-height: 240px; object-fit: contain; display: block; width: auto; } /* Target all table cells within table rows */ tr td { overflow: hidden; }") as demo:
|
294 |
with gr.Group():
|
295 |
gr.Markdown("""# HunyuanVideo Keyframe Control Lora for Video Generation
|
296 |
**Generate videos using the HunyuanVideo model with a prompt and two (or more) frames as conditions. Gradio / HF Spaces implementation demo.**
|
|
|
306 |
|
307 |
|
308 |
with gr.Row():
|
309 |
+
with gr.Column(scale=5):
|
310 |
with gr.Row():
|
311 |
prompt_textbox = gr.Textbox(label="Prompt", value="a subject ...", scale=2)
|
312 |
resolution = gr.Dropdown(
|
|
|
320 |
guidance_scale = gr.Slider(minimum=0.1, maximum=20, step=0.1, label="Guidance Scale", value=6.0)
|
321 |
num_frames = gr.Slider(minimum=1, maximum=129, step=1, label="Number of Frames", value=49)
|
322 |
generate_button = gr.Button("Generate Video")
|
323 |
+
with gr.Column(scale=3):
|
324 |
outputs = gr.Video(label="Generated Video")
|
325 |
with gr.Accordion(label="Examples"):
|
326 |
gr.Markdown("""
|
327 |
<div>
|
328 |
+
| Starting Frame | End Frame | Generated Video | | --- | --- | --- | | <img src="https://content.dashtoon.ai/stability-images/41aeca63-064a-4003-8c8b-bfe2cc80d275.png" width=200> | <img src="https://content.dashtoon.ai/stability-images/28956177-3455-4b56-bb6c-73eacef323ca.png" width=200> | <video controls autoplay src="https://content.dashtoon.ai/stability-images/14b7dd1a-1f46-4c4c-b4ec-9d0f948712af.mp4"></video> | | <img src="https://content.dashtoon.ai/stability-images/ddabbf2f-4218-497b-8239-b7b882d93000.png" width=200> | <img src="https://content.dashtoon.ai/stability-images/b603acba-40a4-44ba-aa26-ed79403df580.png" width=200> | <video controls autoplay src="https://content.dashtoon.ai/stability-images/b00ba193-b3b7-41a1-9bc1-9fdaceba6efa.mp4"></video> | | <img src="https://content.dashtoon.ai/stability-images/5298cf0c-0955-4568-935a-2fb66045f21d.png" width=200> | <img src="https://content.dashtoon.ai/stability-images/722a4ea7-7092-4323-8e83-3f627e8fd7f8.png" width=200> | <video controls autoplay src="https://content.dashtoon.ai/stability-images/0cb84780-4fdf-4ecc-ab48-12e7e1055a39.mp4"></video> | | <img src="https://content.dashtoon.ai/stability-images/69d9a49f-95c0-4e85-bd49-14a039373c8b.png" width=200> | <img src="https://content.dashtoon.ai/stability-images/0cef7fa9-e15a-48ec-9bd3-c61921181802.png" width=200> | <video controls autoplay src="https://content.dashtoon.ai/stability-images/ce12156f-0ac2-4d16-b489-37e85c61b5b2.mp4"></video> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
</div>
|
330 |
""", sanitize_html=False)
|
331 |
with gr.Accordion():
|