CharlieAmalet commited on
Commit
49812df
·
verified ·
1 Parent(s): 1892558

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -58,7 +58,8 @@ else:
58
  )
59
  pipe.save_pretrained("./checkpoints", variant="fp16")
60
 
61
- pipe.to("cuda")
 
62
  # pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
63
  #pipe.vae = torch.compile(pipe.vae, mode="reduce-overhead", fullgraph=True)
64
 
@@ -77,6 +78,8 @@ def generate_video(
77
  output_folder: str = "outputs",
78
  ):
79
  global pipe
 
 
80
  # note julian: normally we should resize input images, but normally they are already in 1024x576, so..
81
 
82
  # also, I would like to experiment with vertical videos, and 1024x512 videos
 
58
  )
59
  pipe.save_pretrained("./checkpoints", variant="fp16")
60
 
61
+ # device = "cuda" if torch.cuda.is_available() else "cpu"
62
+ # pipe.to(device)
63
  # pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
64
  #pipe.vae = torch.compile(pipe.vae, mode="reduce-overhead", fullgraph=True)
65
 
 
78
  output_folder: str = "outputs",
79
  ):
80
  global pipe
81
+ device = "cuda" if torch.cuda.is_available() else "cpu"
82
+ pipe.to(device)
83
  # note julian: normally we should resize input images, but normally they are already in 1024x576, so..
84
 
85
  # also, I would like to experiment with vertical videos, and 1024x512 videos