Spaces:
Running
on
Zero
Running
on
Zero
docstring
Browse files
app.py
CHANGED
@@ -147,6 +147,28 @@ def generate(prompt, negative_prompt, input_image_filepath, input_video_filepath
|
|
147 |
ui_frames_to_use,
|
148 |
seed_ui, randomize_seed, ui_guidance_scale, improve_texture_flag,
|
149 |
progress=gr.Progress(track_tqdm=True)):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
|
151 |
if randomize_seed:
|
152 |
seed_ui = random.randint(0, 2**32 - 1)
|
|
|
147 |
ui_frames_to_use,
|
148 |
seed_ui, randomize_seed, ui_guidance_scale, improve_texture_flag,
|
149 |
progress=gr.Progress(track_tqdm=True)):
|
150 |
+
"""
|
151 |
+
Generate high-quality videos using LTX Video model with support for text-to-video, image-to-video, and video-to-video modes.
|
152 |
+
|
153 |
+
Args:
|
154 |
+
prompt (str): Text description of the desired video content.
|
155 |
+
negative_prompt (str): Text describing what to avoid in the generated video.
|
156 |
+
input_image_filepath (str): Path to input image file for image-to-video mode, or None for other modes.
|
157 |
+
input_video_filepath (str): Path to input video file for video-to-video mode, or None for other modes.
|
158 |
+
height_ui (int): Height of the output video in pixels, must be divisible by 32.
|
159 |
+
width_ui (int): Width of the output video in pixels, must be divisible by 32.
|
160 |
+
mode (str): Generation mode - one of "text-to-video", "image-to-video", or "video-to-video".
|
161 |
+
duration_ui (float): Duration of the output video in seconds (0.3 to 8.5).
|
162 |
+
ui_frames_to_use (int): Number of frames to use from input video for video-to-video mode.
|
163 |
+
seed_ui (int): Random seed for reproducible generation (0 to 2^32-1).
|
164 |
+
randomize_seed (bool): Whether to use a random seed instead of the specified seed.
|
165 |
+
ui_guidance_scale (float): CFG scale controlling prompt influence (1.0 to 10.0).
|
166 |
+
improve_texture_flag (bool): Whether to use multi-scale generation for better texture quality.
|
167 |
+
progress (gr.Progress): Progress tracker for the generation process.
|
168 |
+
|
169 |
+
Returns:
|
170 |
+
tuple: A tuple containing (output_video_path, used_seed) where output_video_path is the path to the generated video file and used_seed is the actual seed used for generation.
|
171 |
+
"""
|
172 |
|
173 |
if randomize_seed:
|
174 |
seed_ui = random.randint(0, 2**32 - 1)
|