Spaces:
Running
on
Zero
Running
on
Zero
IceClear
commited on
Commit
·
8567740
1
Parent(s):
67c0e7b
update
Browse files
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(
|
| 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(
|
| 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]
|
|
@@ -222,7 +222,7 @@ def generation_step(runner, text_embeds_dict, cond_latents):
|
|
| 222 |
|
| 223 |
return samples
|
| 224 |
|
| 225 |
-
@spaces.GPU(
|
| 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/' + uuid.uuid4() + '.mp4'
|
|
|
|
| 149 |
if sp_size > 1:
|
| 150 |
init_sequence_parallel(sp_size)
|
| 151 |
|
| 152 |
+
@spaces.GPU()
|
| 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()
|
| 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]
|
|
|
|
| 222 |
|
| 223 |
return samples
|
| 224 |
|
| 225 |
+
@spaces.GPU()
|
| 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/' + uuid.uuid4() + '.mp4'
|