Manjushri commited on
Commit
2e0ec63
·
verified ·
1 Parent(s): 0b22b77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -13,17 +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 = DiffusionPipeline.from_pretrained("stabilityai/stable-video-diffusion-img2vid-xt-1-1", torch_dtype=torch.float16, variant="fp16")
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(image):
24
  torch.cuda.max_memory_allocated(device=device)
25
  torch.cuda.empty_cache()
26
- frames = pipe(image).images[0]
27
  torch.cuda.empty_cache()
28
  return frames
29
 
 
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 = DiffusionPipeline.from_pretrained("stabilityai/stable-video-diffusion-img2vid-xt-1-1", variant="fp16")
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
29