Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
#7
by
Rickhv2000
- opened
app.py
CHANGED
|
@@ -93,7 +93,7 @@ def get_duration(input_image, prompt, height, width,
|
|
| 93 |
|
| 94 |
@spaces.GPU(duration=get_duration)
|
| 95 |
def generate_video(input_image, prompt, height, width,
|
| 96 |
-
negative_prompt=default_negative_prompt, duration_seconds =
|
| 97 |
guidance_scale = 1, steps = 4,
|
| 98 |
seed = 42, randomize_seed = False,
|
| 99 |
progress=gr.Progress(track_tqdm=True)):
|
|
@@ -130,7 +130,7 @@ with gr.Blocks() as demo:
|
|
| 130 |
with gr.Column():
|
| 131 |
input_image_component = gr.Image(type="pil", label="Input Image (auto-resized to target H/W)")
|
| 132 |
prompt_input = gr.Textbox(label="Prompt", value=default_prompt_i2v)
|
| 133 |
-
duration_seconds_input = gr.Slider(minimum=round(MIN_FRAMES_MODEL/FIXED_FPS,1), maximum=round(MAX_FRAMES_MODEL/FIXED_FPS,1), step=0.1, value=
|
| 134 |
|
| 135 |
with gr.Accordion("Advanced Settings", open=False):
|
| 136 |
negative_prompt_input = gr.Textbox(label="Negative Prompt", value=default_negative_prompt, lines=3)
|
|
|
|
| 93 |
|
| 94 |
@spaces.GPU(duration=get_duration)
|
| 95 |
def generate_video(input_image, prompt, height, width,
|
| 96 |
+
negative_prompt=default_negative_prompt, duration_seconds =10,
|
| 97 |
guidance_scale = 1, steps = 4,
|
| 98 |
seed = 42, randomize_seed = False,
|
| 99 |
progress=gr.Progress(track_tqdm=True)):
|
|
|
|
| 130 |
with gr.Column():
|
| 131 |
input_image_component = gr.Image(type="pil", label="Input Image (auto-resized to target H/W)")
|
| 132 |
prompt_input = gr.Textbox(label="Prompt", value=default_prompt_i2v)
|
| 133 |
+
duration_seconds_input = gr.Slider(minimum=round(MIN_FRAMES_MODEL/FIXED_FPS,1), maximum=round(MAX_FRAMES_MODEL/FIXED_FPS,1), step=0.1, value=10, label="Duration (seconds)", info=f"Clamped to model's {MIN_FRAMES_MODEL}-{MAX_FRAMES_MODEL} frames at {FIXED_FPS}fps.")
|
| 134 |
|
| 135 |
with gr.Accordion("Advanced Settings", open=False):
|
| 136 |
negative_prompt_input = gr.Textbox(label="Negative Prompt", value=default_negative_prompt, lines=3)
|