Spaces:
Running
Running
OmPrakashSingh1704
commited on
Commit
•
4c79528
1
Parent(s):
d8a9cb9
- options/Video_model/Model.py +2 -2
- requirements.txt +2 -1
options/Video_model/Model.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import torch,os
|
2 |
from diffusers import StableVideoDiffusionPipeline
|
3 |
from diffusers.utils import load_image, export_to_video
|
4 |
from PIL import Image
|
@@ -38,4 +38,4 @@ def Video(image):
|
|
38 |
# Export the frames to a video file
|
39 |
export_to_video(frames, path, fps=7)
|
40 |
|
41 |
-
return path
|
|
|
1 |
+
import torch,os,cv2
|
2 |
from diffusers import StableVideoDiffusionPipeline
|
3 |
from diffusers.utils import load_image, export_to_video
|
4 |
from PIL import Image
|
|
|
38 |
# Export the frames to a video file
|
39 |
export_to_video(frames, path, fps=7)
|
40 |
|
41 |
+
return cv2.VideoCapture(path)
|
requirements.txt
CHANGED
@@ -8,4 +8,5 @@ torch==2.1.0
|
|
8 |
torchvision==0.16.0
|
9 |
transformers==4.42.3
|
10 |
xformers==0.0.22.post7
|
11 |
-
peft==0.9.0
|
|
|
|
8 |
torchvision==0.16.0
|
9 |
transformers==4.42.3
|
10 |
xformers==0.0.22.post7
|
11 |
+
peft==0.9.0
|
12 |
+
opencv-python
|