Manjushri commited on
Commit
ed38d84
·
verified ·
1 Parent(s): 7161651

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -13,9 +13,8 @@ login(token=token)
13
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
14
  torch.cuda.max_memory_allocated(device=device)
15
  torch.cuda.empty_cache()
16
- pipe = StableVideoDiffusionPipeline.from_pretrained("stabilityai/stable-video-diffusion-img2vid", use_safetensors=True)
17
  #pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
18
-
19
  pipe.enable_xformers_memory_efficient_attention()
20
  pipe = pipe.to(device)
21
  torch.cuda.empty_cache()
@@ -23,9 +22,6 @@ torch.cuda.empty_cache()
23
 
24
 
25
  def genie(src_image):
26
- torch.cuda.max_memory_allocated(device=device)
27
- torch.cuda.empty_cache()
28
-
29
  frames = pipe(image=src_image).images[0]
30
  torch.cuda.empty_cache()
31
  return frames
 
13
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
14
  torch.cuda.max_memory_allocated(device=device)
15
  torch.cuda.empty_cache()
16
+ pipe = StableVideoDiffusionPipeline.from_pretrained("stabilityai/stable-video-diffusion-img2vid")
17
  #pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
 
18
  pipe.enable_xformers_memory_efficient_attention()
19
  pipe = pipe.to(device)
20
  torch.cuda.empty_cache()
 
22
 
23
 
24
  def genie(src_image):
 
 
 
25
  frames = pipe(image=src_image).images[0]
26
  torch.cuda.empty_cache()
27
  return frames