burakcanbiner commited on
Commit
6ce1706
1 Parent(s): 2bd9509

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,6 +1,6 @@
1
  # Adapted from https://github.com/guoyww/AnimateDiff/blob/main/app.py
2
 
3
- # import spaces
4
  import os
5
  import json
6
  import torch
@@ -67,7 +67,7 @@ class AnimateController:
67
 
68
 
69
 
70
- #@spaces.GPU
71
  def preprocess(self, image=None):
72
 
73
  model_key = "CompVis/stable-diffusion-v1-4"
@@ -89,7 +89,7 @@ class AnimateController:
89
 
90
  T.ToPILImage()(recon_image[0]).save(os.path.join(save_path, f'recon.jpg'))
91
 
92
- #@spaces.GPU
93
  def generate(self, file=None, audio=None, prompt=None,
94
  cfg_scale=5, image_path=None,
95
  pnp_f_t=0.8, pnp_attn_t=0.8,):
 
1
  # Adapted from https://github.com/guoyww/AnimateDiff/blob/main/app.py
2
 
3
+ import spaces
4
  import os
5
  import json
6
  import torch
 
67
 
68
 
69
 
70
+ @spaces.GPU
71
  def preprocess(self, image=None):
72
 
73
  model_key = "CompVis/stable-diffusion-v1-4"
 
89
 
90
  T.ToPILImage()(recon_image[0]).save(os.path.join(save_path, f'recon.jpg'))
91
 
92
+ @spaces.GPU
93
  def generate(self, file=None, audio=None, prompt=None,
94
  cfg_scale=5, image_path=None,
95
  pnp_f_t=0.8, pnp_attn_t=0.8,):