EvanTHU commited on
Commit
1fd6914
·
verified ·
1 Parent(s): e768692

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -110,6 +110,7 @@ CSS = """
110
  }
111
  """
112
 
 
113
  def generate_video_from_text(text, opt, pipeline):
114
  width = 500
115
  height = 500
@@ -165,6 +166,7 @@ def generate_video_from_text(text, opt, pipeline):
165
  edit_config = set_all_use_to_false(edit_config)
166
  return video_dis, video_dis, video_dis, video_dis, style_dis, video_dis, gr.update(visible=True)
167
 
 
168
  def reweighting(text, idx, weight, opt, pipeline):
169
  global edit_config
170
  edit_config.reweighting_attn.use = True
@@ -243,6 +245,7 @@ def reweighting(text, idx, weight, opt, pipeline):
243
  edit_config = set_all_use_to_false(edit_config)
244
  return video_dis
245
 
 
246
  def generate_example_based_motion(text, chunk_size, example_based_steps_end, temp_seed, temp_seed_bar, num_motion, opt, pipeline):
247
  global edit_config
248
  edit_config.example_based.use = True
@@ -329,6 +332,7 @@ def generate_example_based_motion(text, chunk_size, example_based_steps_end, tem
329
  edit_config = set_all_use_to_false(edit_config)
330
  return video_dis
331
 
 
332
  def transfer_style(text, style_text, style_transfer_steps_end, opt, pipeline):
333
  global edit_config
334
  edit_config.style_tranfer.use = True
 
110
  }
111
  """
112
 
113
+ @spaces.GPU
114
  def generate_video_from_text(text, opt, pipeline):
115
  width = 500
116
  height = 500
 
166
  edit_config = set_all_use_to_false(edit_config)
167
  return video_dis, video_dis, video_dis, video_dis, style_dis, video_dis, gr.update(visible=True)
168
 
169
+ @spaces.GPU
170
  def reweighting(text, idx, weight, opt, pipeline):
171
  global edit_config
172
  edit_config.reweighting_attn.use = True
 
245
  edit_config = set_all_use_to_false(edit_config)
246
  return video_dis
247
 
248
+ @spaces.GPU
249
  def generate_example_based_motion(text, chunk_size, example_based_steps_end, temp_seed, temp_seed_bar, num_motion, opt, pipeline):
250
  global edit_config
251
  edit_config.example_based.use = True
 
332
  edit_config = set_all_use_to_false(edit_config)
333
  return video_dis
334
 
335
+ @spaces.GPU
336
  def transfer_style(text, style_text, style_transfer_steps_end, opt, pipeline):
337
  global edit_config
338
  edit_config.style_tranfer.use = True