toshas commited on
Commit
e411cc4
1 Parent(s): 6b7e583

peg requirements

Browse files

zero-gpu adjustments

Files changed (2) hide show
  1. app.py +4 -0
  2. requirements.txt +3 -3
app.py CHANGED
@@ -4,6 +4,7 @@ import shutil
4
  import zipfile
5
  from io import BytesIO
6
 
 
7
  import gradio as gr
8
  import imageio as imageio
9
  import numpy as np
@@ -45,6 +46,7 @@ default_bas_frame_near = 1
45
  default_bas_frame_far = 1
46
 
47
 
 
48
  def process_image(
49
  pipe,
50
  path_input,
@@ -87,6 +89,7 @@ def process_image(
87
  )
88
 
89
 
 
90
  def process_video(
91
  pipe,
92
  path_input,
@@ -184,6 +187,7 @@ def process_video(
184
  )
185
 
186
 
 
187
  def process_bas(
188
  pipe,
189
  path_input,
 
4
  import zipfile
5
  from io import BytesIO
6
 
7
+ import spaces
8
  import gradio as gr
9
  import imageio as imageio
10
  import numpy as np
 
46
  default_bas_frame_far = 1
47
 
48
 
49
+ @spaces.GPU
50
  def process_image(
51
  pipe,
52
  path_input,
 
89
  )
90
 
91
 
92
+ @spaces.GPU
93
  def process_video(
94
  pipe,
95
  path_input,
 
187
  )
188
 
189
 
190
+ @spaces.GPU
191
  def process_bas(
192
  pipe,
193
  path_input,
requirements.txt CHANGED
@@ -6,10 +6,10 @@ imageio
6
  imageio-ffmpeg
7
  Pillow
8
 
9
- accelerate>=0.22.0
10
  diffusers==0.27.2
11
  matplotlib==3.8.2
12
  scipy==1.11.4
13
  torch==2.0.1
14
- transformers>=4.32.1
15
- xformers>=0.0.21
 
6
  imageio-ffmpeg
7
  Pillow
8
 
9
+ accelerate==0.28.0
10
  diffusers==0.27.2
11
  matplotlib==3.8.2
12
  scipy==1.11.4
13
  torch==2.0.1
14
+ transformers==4.39.1
15
+ xformers==0.0.25