Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ from pyramid_dit import PyramidDiTForVideoGeneration
|
|
5 |
from diffusers.utils import load_image, export_to_video
|
6 |
from huggingface_hub import snapshot_download
|
7 |
import os
|
|
|
8 |
|
9 |
# Download and load the model
|
10 |
model_path = 'pyramid_flow_model'
|
@@ -25,6 +26,7 @@ model.dit.to("cuda")
|
|
25 |
model.text_encoder.to("cuda")
|
26 |
model.vae.enable_tiling()
|
27 |
|
|
|
28 |
def generate_video(prompt, height, width, duration, guidance_scale, video_guidance_scale):
|
29 |
temp = 16 if duration == "5s" else 31
|
30 |
|
|
|
5 |
from diffusers.utils import load_image, export_to_video
|
6 |
from huggingface_hub import snapshot_download
|
7 |
import os
|
8 |
+
import spaces
|
9 |
|
10 |
# Download and load the model
|
11 |
model_path = 'pyramid_flow_model'
|
|
|
26 |
model.text_encoder.to("cuda")
|
27 |
model.vae.enable_tiling()
|
28 |
|
29 |
+
@spaces.GPU(duration=120)
|
30 |
def generate_video(prompt, height, width, duration, guidance_scale, video_guidance_scale):
|
31 |
temp = 16 if duration == "5s" else 31
|
32 |
|