Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
9 |
|
10 |
# Load the pipeline
|
11 |
pipeline = StableVideoDiffusionPipeline.from_pretrained(
|
12 |
-
"stabilityai/stable-video-diffusion-img2vid-xt
|
13 |
)
|
14 |
pipeline.to(device)
|
15 |
|
@@ -27,7 +27,7 @@ def generate_video(image_path, seed):
|
|
27 |
|
28 |
# Export the frames to a video file
|
29 |
output_video_path = "generated.mp4"
|
30 |
-
export_to_video(frames, output_video_path, fps=
|
31 |
|
32 |
return output_video_path
|
33 |
|
|
|
9 |
|
10 |
# Load the pipeline
|
11 |
pipeline = StableVideoDiffusionPipeline.from_pretrained(
|
12 |
+
"stabilityai/stable-video-diffusion-img2vid-xt", torch_dtype=torch.float16, variant="fp16"
|
13 |
)
|
14 |
pipeline.to(device)
|
15 |
|
|
|
27 |
|
28 |
# Export the frames to a video file
|
29 |
output_video_path = "generated.mp4"
|
30 |
+
export_to_video(frames, output_video_path, fps=7)
|
31 |
|
32 |
return output_video_path
|
33 |
|