lev1 commited on
Commit
7de406f
·
verified ·
1 Parent(s): 840fe70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -12
app.py CHANGED
@@ -102,24 +102,24 @@ def change_visibility(value):
102
 
103
  examples_1 = [
104
  ["Experience the dance of jellyfish: float through mesmerizing swarms of jellyfish, pulsating with otherworldly grace and beauty.",
105
- None, "56 - frames", None, "ModelScopeT2V (text to video)", "MS-Vid2Vid-XL", 33, 50, 9.0],
106
  ["People dancing in room filled with fog and colorful lights.",
107
- None, "56 - frames", None, "ModelScopeT2V (text to video)", "MS-Vid2Vid-XL", 33, 50, 9.0],
108
  ["Discover the secret language of bees: delve into the complex communication system that allows bees to coordinate their actions and navigate the world.",
109
- None, "56 - frames", None, "AnimateDiff (text to video)", "MS-Vid2Vid-XL", 33, 50, 9.0],
110
  ["sunset, orange sky, warm lighting, fishing boats, ocean waves seagulls, rippling water, wharf, silhouette, serene atmosphere, dusk, evening glow, coastal landscape, seaside scenery.",
111
- None, "56 - frames", None, "AnimateDiff (text to video)", "MS-Vid2Vid-XL", 33, 50, 9.0],
112
  ["Dive into the depths of the ocean: explore vibrant coral reefs, mysterious underwater caves, and the mesmerizing creatures that call the sea home.",
113
- None, "56 - frames", None, "SVD (image to video)", "MS-Vid2Vid-XL", 33, 50, 9.0],
114
  ["Ants, beetles and centipede nest.",
115
- None, "56 - frames", None, "SVD (image to video)", "MS-Vid2Vid-XL", 33, 50, 9.0],
116
  ]
117
 
118
  examples_2 = [
119
  ["Fishes swimming in ocean camera moving, cinematic.",
120
- None, "56 - frames", "__assets__/fish.jpg", "SVD (image to video)", "MS-Vid2Vid-XL", 33, 50, 9.0],
121
  ["A squirrel on a table full of big nuts.",
122
- None, "56 - frames", "__assets__/squirrel.jpg", "SVD (image to video)", "MS-Vid2Vid-XL", 33, 50, 9.0],
123
  ]
124
 
125
  # --------------------------
@@ -210,14 +210,21 @@ with gr.Blocks() as demo:
210
 
211
  inputs_v2v = [prompt_stage1, video_stage1, num_frames, image_stage1, model_name_stage1, model_name_stage2, seed, t, image_guidance]
212
 
 
 
 
 
 
 
 
 
 
213
  gr.Examples(examples=examples_1,
214
  inputs=inputs_v2v,
215
  outputs=[video_stage2],
216
  fn=enhance,
217
  run_on_click=False,
218
- cache_examples=False,
219
- preprocess=False,
220
- postprocess=True,
221
  )
222
 
223
  gr.Examples(examples=examples_2,
@@ -225,7 +232,7 @@ with gr.Blocks() as demo:
225
  outputs=[video_stage2],
226
  fn=enhance,
227
  run_on_click=False,
228
- cache_examples=False,
229
  preprocess=False,
230
  postprocess=True,
231
  )
 
102
 
103
  examples_1 = [
104
  ["Experience the dance of jellyfish: float through mesmerizing swarms of jellyfish, pulsating with otherworldly grace and beauty.",
105
+ None, "56 - frames", None, "ModelScopeT2V (text to video)", None, 33, 50, 9.0],
106
  ["People dancing in room filled with fog and colorful lights.",
107
+ None, "56 - frames", None, "ModelScopeT2V (text to video)", None, 33, 50, 9.0],
108
  ["Discover the secret language of bees: delve into the complex communication system that allows bees to coordinate their actions and navigate the world.",
109
+ None, "56 - frames", None, "AnimateDiff (text to video)", None, 33, 50, 9.0],
110
  ["sunset, orange sky, warm lighting, fishing boats, ocean waves seagulls, rippling water, wharf, silhouette, serene atmosphere, dusk, evening glow, coastal landscape, seaside scenery.",
111
+ None, "56 - frames", None, "AnimateDiff (text to video)", None, 33, 50, 9.0],
112
  ["Dive into the depths of the ocean: explore vibrant coral reefs, mysterious underwater caves, and the mesmerizing creatures that call the sea home.",
113
+ None, "56 - frames", None, "SVD (image to video)", None, 33, 50, 9.0],
114
  ["Ants, beetles and centipede nest.",
115
+ None, "56 - frames", None, "SVD (image to video)", None, 33, 50, 9.0],
116
  ]
117
 
118
  examples_2 = [
119
  ["Fishes swimming in ocean camera moving, cinematic.",
120
+ None, "56 - frames", "__assets__/fish.jpg", "SVD (image to video)", None, 33, 50, 9.0],
121
  ["A squirrel on a table full of big nuts.",
122
+ None, "56 - frames", "__assets__/squirrel.jpg", "SVD (image to video)", None, 33, 50, 9.0],
123
  ]
124
 
125
  # --------------------------
 
210
 
211
  inputs_v2v = [prompt_stage1, video_stage1, num_frames, image_stage1, model_name_stage1, model_name_stage2, seed, t, image_guidance]
212
 
213
+ gr.HTML("""
214
+ <h2>
215
+ You can check the inference time for different number of frames
216
+ <p style=" display: inline">
217
+ <a href="https://github.com/Picsart-AI-Research/StreamingT2V/blob/main/README.md#inference" style="color:blue;" target="_blank">[here].</a>
218
+ </p>
219
+ </h2>
220
+ """)
221
+
222
  gr.Examples(examples=examples_1,
223
  inputs=inputs_v2v,
224
  outputs=[video_stage2],
225
  fn=enhance,
226
  run_on_click=False,
227
+ cache_examples=True,
 
 
228
  )
229
 
230
  gr.Examples(examples=examples_2,
 
232
  outputs=[video_stage2],
233
  fn=enhance,
234
  run_on_click=False,
235
+ cache_examples=True,
236
  preprocess=False,
237
  postprocess=True,
238
  )