Manjushri commited on
Commit
0b2a85a
·
verified ·
1 Parent(s): b4de725

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -13,16 +13,17 @@ 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-xt-1-1", variant="fp16", 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()
22
 
23
  def genie(src_image):
24
  torch.cuda.max_memory_allocated(device=device)
25
  torch.cuda.empty_cache()
 
 
 
 
 
 
26
  frames = pipe(image=src_image).images[0]
27
  torch.cuda.empty_cache()
28
  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
 
 
 
 
17
 
18
  def genie(src_image):
19
  torch.cuda.max_memory_allocated(device=device)
20
  torch.cuda.empty_cache()
21
+ pipe = StableVideoDiffusionPipeline.from_pretrained("stabilityai/stable-video-diffusion-img2vid-xt-1-1", variant="fp16", use_safetensors=True)
22
+ #pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
23
+
24
+ pipe.enable_xformers_memory_efficient_attention()
25
+ pipe = pipe.to(device)
26
+ torch.cuda.empty_cache()
27
  frames = pipe(image=src_image).images[0]
28
  torch.cuda.empty_cache()
29
  return frames