linoyts HF Staff commited on
Commit
3f5ada5
Β·
verified Β·
1 Parent(s): c5b3355

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -12
app.py CHANGED
@@ -1029,6 +1029,7 @@ css = """
1029
  .main-title { text-align: center; margin-bottom: 0.5em; }
1030
  .generate-btn { min-height: 52px !important; font-size: 1.1em !important; }
1031
  footer { display: none !important; }
 
1032
  """
1033
 
1034
  purple_citrus = gr.themes.Citrus(
@@ -1037,13 +1038,13 @@ purple_citrus = gr.themes.Citrus(
1037
  neutral_hue=gr.themes.colors.gray,
1038
  )
1039
 
1040
- with gr.Blocks(title="LTX 2.3 Move") as demo:
1041
  gr.Markdown("<h1 class='main-title'>LTX 2.3 Move</h1>")
1042
 
1043
  # Hidden state β€” preprocessing is always Pose
1044
  video_preprocess = gr.State("Pose (DWPose)")
1045
 
1046
- with gr.Row(equal_height=True):
1047
  # ── Left column: inputs ──────────────────────────────────────
1048
  with gr.Column(scale=1):
1049
  with gr.Row():
@@ -1056,24 +1057,27 @@ with gr.Blocks(title="LTX 2.3 Move") as demo:
1056
  type="filepath",
1057
  )
1058
 
1059
- prompt = gr.Textbox(
1060
- label="Prompt",
1061
- value="Make this come alive with cinematic motion, smooth animation",
1062
- lines=2,
1063
- placeholder="Describe the style, motion, and content you want...",
1064
- )
1065
 
1066
  with gr.Row():
1067
  duration = gr.Slider(
1068
- label="Duration (s)", minimum=1.0, maximum=10.0, value=3.0, step=0.1,
1069
  )
1070
- enhance_prompt = gr.Checkbox(label="Enhance Prompt", value=True)
1071
 
1072
  generate_btn = gr.Button(
1073
  "Generate", variant="primary", size="lg", elem_classes=["generate-btn"],
1074
  )
1075
 
1076
  with gr.Accordion("Advanced Settings", open=False):
 
 
 
 
 
 
 
 
1077
  conditioning_strength = gr.Slider(
1078
  label="V2V Conditioning Strength",
1079
  info="How closely to follow the reference video's structure",
@@ -1098,7 +1102,7 @@ with gr.Blocks(title="LTX 2.3 Move") as demo:
1098
 
1099
  # ── Right column: output ─────────────────────────────────────
1100
  with gr.Column(scale=1):
1101
- output_video = gr.Video(label="Result", autoplay=True)
1102
 
1103
  # ── Event handlers ───────────────────────────────────────────────────
1104
  input_image.change(
@@ -1128,4 +1132,4 @@ with gr.Blocks(title="LTX 2.3 Move") as demo:
1128
 
1129
 
1130
  if __name__ == "__main__":
1131
- demo.launch(css=css, theme=purple_citrus)
 
1029
  .main-title { text-align: center; margin-bottom: 0.5em; }
1030
  .generate-btn { min-height: 52px !important; font-size: 1.1em !important; }
1031
  footer { display: none !important; }
1032
+ video { object-fit: contain !important; }
1033
  """
1034
 
1035
  purple_citrus = gr.themes.Citrus(
 
1038
  neutral_hue=gr.themes.colors.gray,
1039
  )
1040
 
1041
+ with gr.Blocks(title="LTX 2.3 Move", css=css, theme=purple_citrus) as demo:
1042
  gr.Markdown("<h1 class='main-title'>LTX 2.3 Move</h1>")
1043
 
1044
  # Hidden state β€” preprocessing is always Pose
1045
  video_preprocess = gr.State("Pose (DWPose)")
1046
 
1047
+ with gr.Row():
1048
  # ── Left column: inputs ──────────────────────────────────────
1049
  with gr.Column(scale=1):
1050
  with gr.Row():
 
1057
  type="filepath",
1058
  )
1059
 
1060
+
 
 
 
 
 
1061
 
1062
  with gr.Row():
1063
  duration = gr.Slider(
1064
+ label="Duration (s)", minimum=1.0, maximum=15.0, value=3.0, step=0.5,
1065
  )
1066
+
1067
 
1068
  generate_btn = gr.Button(
1069
  "Generate", variant="primary", size="lg", elem_classes=["generate-btn"],
1070
  )
1071
 
1072
  with gr.Accordion("Advanced Settings", open=False):
1073
+ prompt = gr.Textbox(
1074
+ label="Prompt",
1075
+ value="Make this come alive with cinematic motion, smooth animation",
1076
+ lines=2,
1077
+ placeholder="Describe the style, motion, and content you want...",
1078
+
1079
+ )
1080
+ enhance_prompt = gr.Checkbox(label="Enhance Prompt", value=True)
1081
  conditioning_strength = gr.Slider(
1082
  label="V2V Conditioning Strength",
1083
  info="How closely to follow the reference video's structure",
 
1102
 
1103
  # ── Right column: output ─────────────────────────────────────
1104
  with gr.Column(scale=1):
1105
+ output_video = gr.Video(label="Result", autoplay=True, height=480)
1106
 
1107
  # ── Event handlers ───────────────────────────────────────────────────
1108
  input_image.change(
 
1132
 
1133
 
1134
  if __name__ == "__main__":
1135
+ demo.launch()