Spaces:
Paused
Paused
IceClear
commited on
Commit
·
631d19b
1
Parent(s):
ab75ac1
add GPU
Browse files
app.py
CHANGED
|
@@ -58,6 +58,7 @@ import gradio as gr
|
|
| 58 |
from pathlib import Path
|
| 59 |
from urllib.parse import urlparse
|
| 60 |
from torch.hub import download_url_to_file, get_dir
|
|
|
|
| 61 |
|
| 62 |
|
| 63 |
def load_file_from_url(url, model_dir=None, progress=True, file_name=None):
|
|
@@ -199,6 +200,7 @@ def generation_step(runner, text_embeds_dict, cond_latents):
|
|
| 199 |
|
| 200 |
return samples
|
| 201 |
|
|
|
|
| 202 |
def generation_loop(video_path='./test_videos', output_dir='./results', seed=666, batch_size=1, cfg_scale=1.0, cfg_rescale=0.0, sample_steps=1, res_h=1280, res_w=720, sp_size=1):
|
| 203 |
runner = configure_runner(1)
|
| 204 |
output_dir = 'output/out.mp4'
|
|
|
|
| 58 |
from pathlib import Path
|
| 59 |
from urllib.parse import urlparse
|
| 60 |
from torch.hub import download_url_to_file, get_dir
|
| 61 |
+
from spaces import GPU
|
| 62 |
|
| 63 |
|
| 64 |
def load_file_from_url(url, model_dir=None, progress=True, file_name=None):
|
|
|
|
| 200 |
|
| 201 |
return samples
|
| 202 |
|
| 203 |
+
@GPU
|
| 204 |
def generation_loop(video_path='./test_videos', output_dir='./results', seed=666, batch_size=1, cfg_scale=1.0, cfg_rescale=0.0, sample_steps=1, res_h=1280, res_w=720, sp_size=1):
|
| 205 |
runner = configure_runner(1)
|
| 206 |
output_dir = 'output/out.mp4'
|