Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -117,13 +117,13 @@ def generate_video(
|
|
| 117 |
input_image,
|
| 118 |
prompt: str,
|
| 119 |
duration: float,
|
| 120 |
-
negative_prompt: str,
|
| 121 |
-
seed: int,
|
| 122 |
-
randomize_seed: bool,
|
| 123 |
-
num_inference_steps: int,
|
| 124 |
-
cfg_guidance_scale: float,
|
| 125 |
-
height: int,
|
| 126 |
-
width: int,
|
| 127 |
progress=gr.Progress(track_tqdm=True)
|
| 128 |
):
|
| 129 |
"""Generate a video based on the given parameters."""
|
|
@@ -286,7 +286,9 @@ with gr.Blocks(title="LTX-2 Image-to-Video") as demo:
|
|
| 286 |
5.0,
|
| 287 |
]
|
| 288 |
],
|
|
|
|
| 289 |
inputs=[input_image, prompt, duration],
|
|
|
|
| 290 |
label="Example",
|
| 291 |
cache_examples=True,
|
| 292 |
cache_mode="lazy",
|
|
|
|
| 117 |
input_image,
|
| 118 |
prompt: str,
|
| 119 |
duration: float,
|
| 120 |
+
negative_prompt: str = DEFAULT_NEGATIVE_PROMPT,
|
| 121 |
+
seed: int = 42,
|
| 122 |
+
randomize_seed: bool = True,
|
| 123 |
+
num_inference_steps: int = DEFAULT_NUM_INFERENCE_STEPS,
|
| 124 |
+
cfg_guidance_scale: float = DEFAULT_CFG_GUIDANCE_SCALE,
|
| 125 |
+
height: int = DEFAULT_HEIGHT,
|
| 126 |
+
width: int = DEFAULT_WIDTH,
|
| 127 |
progress=gr.Progress(track_tqdm=True)
|
| 128 |
):
|
| 129 |
"""Generate a video based on the given parameters."""
|
|
|
|
| 286 |
5.0,
|
| 287 |
]
|
| 288 |
],
|
| 289 |
+
fn=generate_video,
|
| 290 |
inputs=[input_image, prompt, duration],
|
| 291 |
+
outputs = [output_video]
|
| 292 |
label="Example",
|
| 293 |
cache_examples=True,
|
| 294 |
cache_mode="lazy",
|