Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import imageio
|
|
4 |
from diffusers import StableVideoDiffusionPipeline
|
5 |
from diffusers.utils import load_image, export_to_video
|
6 |
import gradio as gr
|
|
|
7 |
|
8 |
# Load the pipeline
|
9 |
pipe = StableVideoDiffusionPipeline.from_pretrained(
|
@@ -14,6 +15,7 @@ pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
|
|
14 |
pipe.enable_model_cpu_offload()
|
15 |
pipe.unet.enable_forward_chunking()
|
16 |
|
|
|
17 |
def generate_video(image, seed=42, fps=7, motion_bucket_id=180, noise_aug_strength=0.1):
|
18 |
# Resize the image
|
19 |
image = image.resize((1024, 576))
|
|
|
4 |
from diffusers import StableVideoDiffusionPipeline
|
5 |
from diffusers.utils import load_image, export_to_video
|
6 |
import gradio as gr
|
7 |
+
import spaces
|
8 |
|
9 |
# Load the pipeline
|
10 |
pipe = StableVideoDiffusionPipeline.from_pretrained(
|
|
|
15 |
pipe.enable_model_cpu_offload()
|
16 |
pipe.unet.enable_forward_chunking()
|
17 |
|
18 |
+
@spaces.GPU
|
19 |
def generate_video(image, seed=42, fps=7, motion_bucket_id=180, noise_aug_strength=0.1):
|
20 |
# Resize the image
|
21 |
image = image.resize((1024, 576))
|