Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -137,7 +137,7 @@ def resize_and_crop_to_match(target_image, reference_image):
|
|
| 137 |
left, top = (new_width - ref_width) // 2, (new_height - ref_height) // 2
|
| 138 |
return resized.crop((left, top, left + ref_width, top + ref_height))
|
| 139 |
|
| 140 |
-
@spaces.GPU(duration=
|
| 141 |
def generate_video(
|
| 142 |
start_image_pil,
|
| 143 |
end_image_pil,
|
|
@@ -219,9 +219,9 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as app:
|
|
| 219 |
prompt = gr.Textbox(label="Prompt", info="Describe the transition between the two images")
|
| 220 |
|
| 221 |
with gr.Accordion("Advanced Settings", open=False):
|
| 222 |
-
duration_seconds_input = gr.Slider(minimum=MIN_DURATION, maximum=MAX_DURATION, step=0.1, value=
|
| 223 |
negative_prompt_input = gr.Textbox(label="Negative Prompt", value=default_negative_prompt, lines=3)
|
| 224 |
-
steps_slider = gr.Slider(minimum=
|
| 225 |
guidance_scale_input = gr.Slider(minimum=0.0, maximum=10.0, step=0.5, value=1.0, label="Guidance Scale - high noise")
|
| 226 |
guidance_scale_2_input = gr.Slider(minimum=0.0, maximum=10.0, step=0.5, value=1.0, label="Guidance Scale - low noise")
|
| 227 |
with gr.Row():
|
|
|
|
| 137 |
left, top = (new_width - ref_width) // 2, (new_height - ref_height) // 2
|
| 138 |
return resized.crop((left, top, left + ref_width, top + ref_height))
|
| 139 |
|
| 140 |
+
@spaces.GPU(duration=75)
|
| 141 |
def generate_video(
|
| 142 |
start_image_pil,
|
| 143 |
end_image_pil,
|
|
|
|
| 219 |
prompt = gr.Textbox(label="Prompt", info="Describe the transition between the two images")
|
| 220 |
|
| 221 |
with gr.Accordion("Advanced Settings", open=False):
|
| 222 |
+
duration_seconds_input = gr.Slider(minimum=MIN_DURATION, maximum=MAX_DURATION, step=0.1, value=4, label="Video Duration (seconds)", info=f"Clamped to model's {MIN_FRAMES_MODEL}-{MAX_FRAMES_MODEL} frames at {FIXED_FPS}fps.")
|
| 223 |
negative_prompt_input = gr.Textbox(label="Negative Prompt", value=default_negative_prompt, lines=3)
|
| 224 |
+
steps_slider = gr.Slider(minimum=4, maximum=30, step=1, value=8, label="Inference Steps")
|
| 225 |
guidance_scale_input = gr.Slider(minimum=0.0, maximum=10.0, step=0.5, value=1.0, label="Guidance Scale - high noise")
|
| 226 |
guidance_scale_2_input = gr.Slider(minimum=0.0, maximum=10.0, step=0.5, value=1.0, label="Guidance Scale - low noise")
|
| 227 |
with gr.Row():
|