guardiancc commited on
Commit
6010cc7
·
verified ·
1 Parent(s): 1a8f9ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -13,8 +13,7 @@ pipe = CogVideoXImageToVideoPipeline.from_pretrained(
13
  def generate_video(prompt, image):
14
  # Ensure the generator is on the same device as the model
15
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
16
- pipe.vae.enable_tiling()
17
- pipe.vae.enable_slicing()
18
  generator = torch.Generator(device=device).manual_seed(42)
19
 
20
  video = pipe(
 
13
  def generate_video(prompt, image):
14
  # Ensure the generator is on the same device as the model
15
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
16
+ pipe.to("cuda")
 
17
  generator = torch.Generator(device=device).manual_seed(42)
18
 
19
  video = pipe(