Pie31415 commited on
Commit
f2d7a97
·
1 Parent(s): a8b352a

Update webui/app_control_animation.py

Browse files
Files changed (1) hide show
  1. webui/app_control_animation.py +29 -29
webui/app_control_animation.py CHANGED
@@ -58,24 +58,7 @@ def create_demo(model: ControlAnimationModel):
58
  value="Generate Initial Frames", variant="primary"
59
  )
60
 
61
- with gr.Column():
62
- gallery_pose_sequence = gr.Gallery(
63
- label="Pose Sequence",
64
- value=[
65
- ("__assets__/dance1.gif", "Motion 1"),
66
- ("__assets__/dance2.gif", "Motion 2"),
67
- ("__assets__/dance3.gif", "Motion 3"),
68
- ("__assets__/dance4.gif", "Motion 4"),
69
- ("__assets__/dance5.gif", "Motion 5"),
70
- ],
71
- ).style(columns=3, rows=1, object_fit="contain", preview=True)
72
- input_video_path = gr.Textbox(
73
- label="Pose Sequence", visible=False, value="Motion 1"
74
- )
75
- pose_sequence_selector = gr.Markdown("Pose Sequence: **Motion 1**")
76
-
77
- with gr.Row():
78
- with gr.Accordion("Advanced options", open=False):
79
  if on_huggingspace:
80
  video_length = gr.Slider(
81
  label="Video length", minimum=8, maximum=16, step=1
@@ -146,19 +129,36 @@ def create_demo(model: ControlAnimationModel):
146
  visible=not on_huggingspace,
147
  info="Ratio of how many tokens are merged. The higher the more compression (less memory and faster inference).",
148
  )
149
- with gr.Column(visible=True) as frame_selection_view:
150
- initial_frames = gr.Gallery(
151
- label="Initial Frames", show_label=False
152
- ).style(columns=4, rows=1, object_fit="contain", preview=True)
153
-
154
- gr.Markdown("Select an initial frame to start your animation with.")
155
- gen_animation_button = gr.Button(
156
- value="Select Initial Frame & Generate Animation",
157
- variant="secondary",
 
 
 
 
 
158
  )
 
 
 
 
 
 
 
 
 
 
 
 
159
 
160
- with gr.Column(visible=False) as animation_view:
161
- result = gr.Video(label="Generated Video")
162
 
163
  with gr.Box(visible=False):
164
  initial_frame_index = gr.Number(
 
58
  value="Generate Initial Frames", variant="primary"
59
  )
60
 
61
+ with gr.Accordion("Advanced options", open=False):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  if on_huggingspace:
63
  video_length = gr.Slider(
64
  label="Video length", minimum=8, maximum=16, step=1
 
129
  visible=not on_huggingspace,
130
  info="Ratio of how many tokens are merged. The higher the more compression (less memory and faster inference).",
131
  )
132
+
133
+ with gr.Column():
134
+ gallery_pose_sequence = gr.Gallery(
135
+ label="Pose Sequence",
136
+ value=[
137
+ ("__assets__/dance1.gif", "Motion 1"),
138
+ ("__assets__/dance2.gif", "Motion 2"),
139
+ ("__assets__/dance3.gif", "Motion 3"),
140
+ ("__assets__/dance4.gif", "Motion 4"),
141
+ ("__assets__/dance5.gif", "Motion 5"),
142
+ ],
143
+ ).style(columns=3, object_fit="contain", preview=True)
144
+ input_video_path = gr.Textbox(
145
+ label="Pose Sequence", visible=False, value="Motion 1"
146
  )
147
+ pose_sequence_selector = gr.Markdown("Pose Sequence: **Motion 1**")
148
+
149
+ with gr.Column(visible=True) as frame_selection_view:
150
+ initial_frames = gr.Gallery(
151
+ label="Initial Frames", show_label=False
152
+ ).style(columns=4, object_fit="contain", preview=True)
153
+
154
+ gr.Markdown("Select an initial frame to start your animation with.")
155
+ gen_animation_button = gr.Button(
156
+ value="Select Initial Frame & Generate Animation",
157
+ variant="secondary",
158
+ )
159
 
160
+ with gr.Column(visible=False) as animation_view:
161
+ result = gr.Video(label="Generated Video")
162
 
163
  with gr.Box(visible=False):
164
  initial_frame_index = gr.Number(