Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -151,7 +151,7 @@ def configure_sequence_parallel(sp_size):
|
|
| 151 |
if sp_size > 1:
|
| 152 |
init_sequence_parallel(sp_size)
|
| 153 |
|
| 154 |
-
|
| 155 |
def configure_runner(sp_size):
|
| 156 |
config_path = os.path.join('./configs_3b', 'main.yaml')
|
| 157 |
config = load_config(config_path)
|
|
@@ -167,7 +167,7 @@ def configure_runner(sp_size):
|
|
| 167 |
runner.vae.set_memory_limit(**runner.config.vae.memory_limit)
|
| 168 |
return runner
|
| 169 |
|
| 170 |
-
|
| 171 |
def generation_step(runner, text_embeds_dict, cond_latents):
|
| 172 |
def _move_to_cuda(x):
|
| 173 |
return [i.to(torch.device("cuda")) for i in x]
|
|
@@ -224,7 +224,7 @@ def generation_step(runner, text_embeds_dict, cond_latents):
|
|
| 224 |
|
| 225 |
return samples
|
| 226 |
|
| 227 |
-
|
| 228 |
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):
|
| 229 |
runner = configure_runner(1)
|
| 230 |
|
|
|
|
| 151 |
if sp_size > 1:
|
| 152 |
init_sequence_parallel(sp_size)
|
| 153 |
|
| 154 |
+
|
| 155 |
def configure_runner(sp_size):
|
| 156 |
config_path = os.path.join('./configs_3b', 'main.yaml')
|
| 157 |
config = load_config(config_path)
|
|
|
|
| 167 |
runner.vae.set_memory_limit(**runner.config.vae.memory_limit)
|
| 168 |
return runner
|
| 169 |
|
| 170 |
+
|
| 171 |
def generation_step(runner, text_embeds_dict, cond_latents):
|
| 172 |
def _move_to_cuda(x):
|
| 173 |
return [i.to(torch.device("cuda")) for i in x]
|
|
|
|
| 224 |
|
| 225 |
return samples
|
| 226 |
|
| 227 |
+
|
| 228 |
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):
|
| 229 |
runner = configure_runner(1)
|
| 230 |
|