Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -195,7 +195,7 @@ def configure_sequence_parallel(sp_size):
|
|
| 195 |
if sp_size > 1:
|
| 196 |
init_sequence_parallel(sp_size)
|
| 197 |
|
| 198 |
-
|
| 199 |
def configure_runner(sp_size):
|
| 200 |
config_path = os.path.join('./configs_3b', 'main.yaml')
|
| 201 |
config = load_config(config_path)
|
|
@@ -211,7 +211,7 @@ def configure_runner(sp_size):
|
|
| 211 |
runner.vae.set_memory_limit(**runner.config.vae.memory_limit)
|
| 212 |
return runner
|
| 213 |
|
| 214 |
-
|
| 215 |
def generation_step(runner, text_embeds_dict, cond_latents):
|
| 216 |
def _move_to_cuda(x):
|
| 217 |
return [i.to(torch.device("cuda")) for i in x]
|
|
@@ -268,8 +268,8 @@ def generation_step(runner, text_embeds_dict, cond_latents):
|
|
| 268 |
|
| 269 |
return samples
|
| 270 |
|
| 271 |
-
|
| 272 |
-
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=
|
| 273 |
runner = configure_runner(1)
|
| 274 |
|
| 275 |
def _extract_text_embeds():
|
|
|
|
| 195 |
if sp_size > 1:
|
| 196 |
init_sequence_parallel(sp_size)
|
| 197 |
|
| 198 |
+
#@spaces.GPU(duration=100)
|
| 199 |
def configure_runner(sp_size):
|
| 200 |
config_path = os.path.join('./configs_3b', 'main.yaml')
|
| 201 |
config = load_config(config_path)
|
|
|
|
| 211 |
runner.vae.set_memory_limit(**runner.config.vae.memory_limit)
|
| 212 |
return runner
|
| 213 |
|
| 214 |
+
#@spaces.GPU(duration=100)
|
| 215 |
def generation_step(runner, text_embeds_dict, cond_latents):
|
| 216 |
def _move_to_cuda(x):
|
| 217 |
return [i.to(torch.device("cuda")) for i in x]
|
|
|
|
| 268 |
|
| 269 |
return samples
|
| 270 |
|
| 271 |
+
#@spaces.GPU(duration=100)
|
| 272 |
+
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=8):
|
| 273 |
runner = configure_runner(1)
|
| 274 |
|
| 275 |
def _extract_text_embeds():
|