Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
from functools import lru_cache
|
2 |
import gradio as gr
|
3 |
from gradio_toggle import Toggle
|
@@ -211,6 +212,7 @@ pipeline = XoraVideoPipeline(
|
|
211 |
vae=vae,
|
212 |
).to(device)
|
213 |
|
|
|
214 |
def generate_video_from_text(
|
215 |
prompt="",
|
216 |
enhance_prompt_toggle=False,
|
@@ -303,7 +305,7 @@ def generate_video_from_text(
|
|
303 |
torch.cuda.empty_cache()
|
304 |
return output_path
|
305 |
|
306 |
-
|
307 |
def generate_video_from_image(
|
308 |
image_path,
|
309 |
prompt="",
|
|
|
1 |
+
import spaces
|
2 |
from functools import lru_cache
|
3 |
import gradio as gr
|
4 |
from gradio_toggle import Toggle
|
|
|
212 |
vae=vae,
|
213 |
).to(device)
|
214 |
|
215 |
+
@spaces.GPU(duration=80)
|
216 |
def generate_video_from_text(
|
217 |
prompt="",
|
218 |
enhance_prompt_toggle=False,
|
|
|
305 |
torch.cuda.empty_cache()
|
306 |
return output_path
|
307 |
|
308 |
+
@spaces.GPU(duration=80)
|
309 |
def generate_video_from_image(
|
310 |
image_path,
|
311 |
prompt="",
|