Spaces:
Sleeping
Sleeping
update space
Browse files
app.py
CHANGED
@@ -9,6 +9,7 @@ import uuid
|
|
9 |
import GPUtil
|
10 |
import gradio as gr
|
11 |
import psutil
|
|
|
12 |
import torch
|
13 |
|
14 |
from videosys import CogVideoXConfig, CogVideoXPABConfig, VideoSysEngine
|
@@ -56,12 +57,14 @@ def get_server_status():
|
|
56 |
return {"cpu": f"{cpu_percent}%", "memory": f"{memory.percent}%", "disk": f"{disk.percent}%", "gpu": gpu_info}
|
57 |
|
58 |
|
|
|
59 |
def generate_vanilla(prompt, num_inference_steps, guidance_scale, progress=gr.Progress(track_tqdm=True)):
|
60 |
engine = load_model()
|
61 |
video_path = generate(engine, prompt, num_inference_steps, guidance_scale)
|
62 |
return video_path
|
63 |
|
64 |
|
|
|
65 |
def generate_vs(
|
66 |
prompt,
|
67 |
num_inference_steps,
|
|
|
9 |
import GPUtil
|
10 |
import gradio as gr
|
11 |
import psutil
|
12 |
+
import spaces
|
13 |
import torch
|
14 |
|
15 |
from videosys import CogVideoXConfig, CogVideoXPABConfig, VideoSysEngine
|
|
|
57 |
return {"cpu": f"{cpu_percent}%", "memory": f"{memory.percent}%", "disk": f"{disk.percent}%", "gpu": gpu_info}
|
58 |
|
59 |
|
60 |
+
@spaces.GPU
|
61 |
def generate_vanilla(prompt, num_inference_steps, guidance_scale, progress=gr.Progress(track_tqdm=True)):
|
62 |
engine = load_model()
|
63 |
video_path = generate(engine, prompt, num_inference_steps, guidance_scale)
|
64 |
return video_path
|
65 |
|
66 |
|
67 |
+
@spaces.GPU
|
68 |
def generate_vs(
|
69 |
prompt,
|
70 |
num_inference_steps,
|