Spaces:
Runtime error
Runtime error
Commit
·
a1cfbda
1
Parent(s):
4215842
options/Video_model/Model.py
CHANGED
|
@@ -13,12 +13,15 @@ def Video(image):
|
|
| 13 |
|
| 14 |
|
| 15 |
pipeline = StableVideoDiffusionPipeline.from_pretrained(
|
| 16 |
-
"stabilityai/stable-video-diffusion-img2vid-xt-1-1", torch_dtype=torch.
|
| 17 |
).to(device)
|
| 18 |
|
| 19 |
# Enable model offloading if using the CPU
|
| 20 |
if device == "cpu":
|
| 21 |
pipeline.enable_model_cpu_offload()
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
image = Image.fromarray(image)
|
| 24 |
image = image.resize((1024, 576))
|
|
|
|
| 13 |
|
| 14 |
|
| 15 |
pipeline = StableVideoDiffusionPipeline.from_pretrained(
|
| 16 |
+
"stabilityai/stable-video-diffusion-img2vid-xt-1-1", torch_dtype=torch.float16
|
| 17 |
).to(device)
|
| 18 |
|
| 19 |
# Enable model offloading if using the CPU
|
| 20 |
if device == "cpu":
|
| 21 |
pipeline.enable_model_cpu_offload()
|
| 22 |
+
else:
|
| 23 |
+
pipeline.enable_sequential_cpu_offload()
|
| 24 |
+
|
| 25 |
|
| 26 |
image = Image.fromarray(image)
|
| 27 |
image = image.resize((1024, 576))
|
options/Video_model/__pycache__/Model.cpython-310.pyc
CHANGED
|
Binary files a/options/Video_model/__pycache__/Model.cpython-310.pyc and b/options/Video_model/__pycache__/Model.cpython-310.pyc differ
|
|
|