Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,12 +6,11 @@ import requests
|
|
6 |
from io import BytesIO
|
7 |
import tempfile
|
8 |
|
9 |
-
# Load pipeline
|
10 |
pipe = StableVideoDiffusionPipeline.from_pretrained(
|
11 |
"stabilityai/stable-video-diffusion-img2vid-xt-1-1",
|
12 |
-
torch_dtype=torch.
|
13 |
variant="fp16"
|
14 |
-
).to("
|
15 |
|
16 |
pipe.enable_model_cpu_offload()
|
17 |
|
|
|
6 |
from io import BytesIO
|
7 |
import tempfile
|
8 |
|
|
|
9 |
pipe = StableVideoDiffusionPipeline.from_pretrained(
|
10 |
"stabilityai/stable-video-diffusion-img2vid-xt-1-1",
|
11 |
+
torch_dtype=torch.float32, # dùng float32 để tương thích CPU
|
12 |
variant="fp16"
|
13 |
+
).to("cpu") # chuyển sang CPU
|
14 |
|
15 |
pipe.enable_model_cpu_offload()
|
16 |
|