caokhoi91 commited on
Commit
35bbeb0
·
verified ·
1 Parent(s): 2a02670

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
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.float16,
13
  variant="fp16"
14
- ).to("cuda")
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