Spaces:
Running
Running
Commit
·
6213120
1
Parent(s):
713f483
update
Browse files
options/Banner_Model/__pycache__/Image2Image_2.cpython-310.pyc
CHANGED
Binary files a/options/Banner_Model/__pycache__/Image2Image_2.cpython-310.pyc and b/options/Banner_Model/__pycache__/Image2Image_2.cpython-310.pyc differ
|
|
options/Video_model/Model.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import torch
|
2 |
from diffusers import StableVideoDiffusionPipeline
|
3 |
-
from diffusers.utils import load_image, export_to_video
|
4 |
-
|
5 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
6 |
print("Using device for video:", device)
|
7 |
|
@@ -10,7 +10,7 @@ pipeline = StableVideoDiffusionPipeline.from_pretrained(
|
|
10 |
).to(device)
|
11 |
# pipeline.enable_model_cpu_offload()
|
12 |
def Video(image):
|
13 |
-
image =
|
14 |
image = image.resize((1024, 576))
|
15 |
|
16 |
generator = torch.Generator(device=device).manual_seed(42)
|
|
|
1 |
import torch
|
2 |
from diffusers import StableVideoDiffusionPipeline
|
3 |
+
# from diffusers.utils import load_image, export_to_video
|
4 |
+
from PIL import Image
|
5 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
6 |
print("Using device for video:", device)
|
7 |
|
|
|
10 |
).to(device)
|
11 |
# pipeline.enable_model_cpu_offload()
|
12 |
def Video(image):
|
13 |
+
image = Image.open(image)
|
14 |
image = image.resize((1024, 576))
|
15 |
|
16 |
generator = torch.Generator(device=device).manual_seed(42)
|