Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -427,6 +427,8 @@ class LTX23UnifiedPipeline:
|
|
| 427 |
"""
|
| 428 |
assert_resolution(height=height, width=width, is_two_stage=True)
|
| 429 |
|
|
|
|
|
|
|
| 430 |
has_audio = audio_path is not None
|
| 431 |
has_video_cond = bool(video_conditioning)
|
| 432 |
|
|
@@ -919,14 +921,14 @@ def generate_video(
|
|
| 919 |
input_audio,
|
| 920 |
prompt: str,
|
| 921 |
duration: float,
|
| 922 |
-
conditioning_strength: float,
|
| 923 |
-
video_preprocess: str,
|
| 924 |
enhance_prompt: bool,
|
| 925 |
use_video_audio: bool,
|
| 926 |
seed: int,
|
| 927 |
randomize_seed: bool,
|
| 928 |
height: int,
|
| 929 |
width: int,
|
|
|
|
| 930 |
progress=gr.Progress(track_tqdm=True),
|
| 931 |
):
|
| 932 |
try:
|
|
@@ -1217,6 +1219,54 @@ with gr.Blocks(title="LTX 2.3 Sync", css=css, theme=purple_citrus) as demo:
|
|
| 1217 |
with gr.Column(scale=1):
|
| 1218 |
output_video = gr.Video(label="Result", autoplay=True, height=480)
|
| 1219 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1220 |
# ββ Event handlers βββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 1221 |
input_image.change(
|
| 1222 |
fn=on_image_upload,
|
|
|
|
| 427 |
"""
|
| 428 |
assert_resolution(height=height, width=width, is_two_stage=True)
|
| 429 |
|
| 430 |
+
prompt += " synchronized lipsync"
|
| 431 |
+
|
| 432 |
has_audio = audio_path is not None
|
| 433 |
has_video_cond = bool(video_conditioning)
|
| 434 |
|
|
|
|
| 921 |
input_audio,
|
| 922 |
prompt: str,
|
| 923 |
duration: float,
|
| 924 |
+
conditioning_strength: float,
|
|
|
|
| 925 |
enhance_prompt: bool,
|
| 926 |
use_video_audio: bool,
|
| 927 |
seed: int,
|
| 928 |
randomize_seed: bool,
|
| 929 |
height: int,
|
| 930 |
width: int,
|
| 931 |
+
video_preprocess: str ="Pose (DWPose)",
|
| 932 |
progress=gr.Progress(track_tqdm=True),
|
| 933 |
):
|
| 934 |
try:
|
|
|
|
| 1219 |
with gr.Column(scale=1):
|
| 1220 |
output_video = gr.Video(label="Result", autoplay=True, height=480)
|
| 1221 |
|
| 1222 |
+
gr.Examples(
|
| 1223 |
+
examples=[
|
| 1224 |
+
[
|
| 1225 |
+
".jpg",
|
| 1226 |
+
"video.mp4",
|
| 1227 |
+
None,
|
| 1228 |
+
"",
|
| 1229 |
+
3.4,
|
| 1230 |
+
0.85,
|
| 1231 |
+
False,
|
| 1232 |
+
True,
|
| 1233 |
+
1824535108,
|
| 1234 |
+
False,
|
| 1235 |
+
768,
|
| 1236 |
+
512,
|
| 1237 |
+
],
|
| 1238 |
+
[
|
| 1239 |
+
".jpg",
|
| 1240 |
+
"video.mp4",
|
| 1241 |
+
None,
|
| 1242 |
+
"a man speaking while making hand gestures",
|
| 1243 |
+
3.5,
|
| 1244 |
+
0.9,
|
| 1245 |
+
False,
|
| 1246 |
+
True,
|
| 1247 |
+
1723325627,
|
| 1248 |
+
False,
|
| 1249 |
+
768,
|
| 1250 |
+
512,
|
| 1251 |
+
],
|
| 1252 |
+
],
|
| 1253 |
+
inputs=[
|
| 1254 |
+
input_image,
|
| 1255 |
+
input_video,
|
| 1256 |
+
input_audio,
|
| 1257 |
+
prompt,
|
| 1258 |
+
duration,
|
| 1259 |
+
conditioning_strength,
|
| 1260 |
+
video_preprocess,
|
| 1261 |
+
enhance_prompt,
|
| 1262 |
+
use_video_audio,
|
| 1263 |
+
seed,
|
| 1264 |
+
randomize_seed,
|
| 1265 |
+
height,
|
| 1266 |
+
width,
|
| 1267 |
+
],
|
| 1268 |
+
)
|
| 1269 |
+
|
| 1270 |
# ββ Event handlers βββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 1271 |
input_image.change(
|
| 1272 |
fn=on_image_upload,
|