Iceclear commited on
Commit
273be34
·
verified ·
1 Parent(s): 196882a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -149,7 +149,7 @@ def configure_sequence_parallel(sp_size):
149
  if sp_size > 1:
150
  init_sequence_parallel(sp_size)
151
 
152
- @spaces.GPU(duration=120)
153
  def configure_runner(sp_size):
154
  config_path = os.path.join('./configs_3b', 'main.yaml')
155
  config = load_config(config_path)
@@ -165,7 +165,7 @@ def configure_runner(sp_size):
165
  runner.vae.set_memory_limit(**runner.config.vae.memory_limit)
166
  return runner
167
 
168
- @spaces.GPU(duration=120)
169
  def generation_step(runner, text_embeds_dict, cond_latents):
170
  def _move_to_cuda(x):
171
  return [i.to(torch.device("cuda")) for i in x]
@@ -206,7 +206,7 @@ def generation_step(runner, text_embeds_dict, cond_latents):
206
  video_tensors = runner.inference(
207
  noises=noises,
208
  conditions=conditions,
209
- dit_offload=True,
210
  **text_embeds_dict,
211
  )
212
 
@@ -222,7 +222,7 @@ def generation_step(runner, text_embeds_dict, cond_latents):
222
 
223
  return samples
224
 
225
- @spaces.GPU(duration=120)
226
  def generation_loop(video_path='./test_videos', seed=666, fps_out=12, batch_size=1, cfg_scale=1.0, cfg_rescale=0.0, sample_steps=1, res_h=1280, res_w=720, sp_size=1):
227
  runner = configure_runner(1)
228
  output_dir = 'output/' + str(uuid.uuid4()) + '.mp4'
 
149
  if sp_size > 1:
150
  init_sequence_parallel(sp_size)
151
 
152
+ @spaces.GPU(duration=100)
153
  def configure_runner(sp_size):
154
  config_path = os.path.join('./configs_3b', 'main.yaml')
155
  config = load_config(config_path)
 
165
  runner.vae.set_memory_limit(**runner.config.vae.memory_limit)
166
  return runner
167
 
168
+ @spaces.GPU(duration=100)
169
  def generation_step(runner, text_embeds_dict, cond_latents):
170
  def _move_to_cuda(x):
171
  return [i.to(torch.device("cuda")) for i in x]
 
206
  video_tensors = runner.inference(
207
  noises=noises,
208
  conditions=conditions,
209
+ dit_offload=False,
210
  **text_embeds_dict,
211
  )
212
 
 
222
 
223
  return samples
224
 
225
+ @spaces.GPU(duration=100)
226
  def generation_loop(video_path='./test_videos', seed=666, fps_out=12, batch_size=1, cfg_scale=1.0, cfg_rescale=0.0, sample_steps=1, res_h=1280, res_w=720, sp_size=1):
227
  runner = configure_runner(1)
228
  output_dir = 'output/' + str(uuid.uuid4()) + '.mp4'