Yaron Koresh commited on
Commit
33b30d1
·
verified ·
1 Parent(s): 152480f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -22
app.py CHANGED
@@ -115,9 +115,7 @@ function custom(){
115
 
116
  # functionality
117
 
118
- # @gpu(cache=True)
119
- @cpu(cache=True,nopython=True,parallel=True)
120
- # @cpu(cache=True)
121
  def run(cmd):
122
  try:
123
  tx = cuda.threadIdx.x
@@ -137,9 +135,7 @@ def run(cmd):
137
  sys.exit()
138
  return result
139
 
140
- # @gpu(cache=True)
141
- @cpu(cache=True,nopython=True,parallel=True)
142
- # @cpu(cache=True)
143
  def translate(args):
144
  try:
145
  tx = cuda.threadIdx.x
@@ -192,9 +188,7 @@ def translate(args):
192
  print(ret)
193
  return ret
194
 
195
- # @gpu(cache=True)
196
- @cpu(cache=True,nopython=True,parallel=True)
197
- # @cpu(cache=True)
198
  def generate_random_string(length):
199
  try:
200
  tx = cuda.threadIdx.x
@@ -210,8 +204,6 @@ def generate_random_string(length):
210
  return ''.join(random.choice(characters) for _ in range(length))
211
 
212
  @gpu(cache=True)
213
- # @cpu(cache=True,nopython=True,parallel=True)
214
- # @cpu(cache=True)
215
  def Piper(image,positive,negative,motion):
216
  try:
217
  tx = cuda.threadIdx.x
@@ -262,8 +254,6 @@ def Piper(image,positive,negative,motion):
262
  )
263
 
264
  @gpu(cache=True)
265
- # @cpu(cache=True,nopython=True,parallel=True)
266
- # @cpu(cache=True)
267
  def infer(pm):
268
  try:
269
  tx = cuda.threadIdx.x
@@ -295,9 +285,7 @@ def infer(pm):
295
  export_to_gif(out.frames[0],name,fps=fps)
296
  return name
297
 
298
- # @gpu(cache=True)
299
- @cpu(cache=True,nopython=True,parallel=True)
300
- # @cpu(cache=True)
301
  def handle(i,m,p1,p2,result):
302
  try:
303
  tx = cuda.threadIdx.x
@@ -324,8 +312,6 @@ def handle(i,m,p1,p2,result):
324
  ret = infer[32+ln,32](arr)
325
  return ret
326
 
327
- # @gpu(cache=True)
328
- # @cpu(cache=True,nopython=True,parallel=True)
329
  @cpu(cache=True)
330
  def ui():
331
  try:
@@ -388,8 +374,6 @@ def ui():
388
  )
389
  demo.queue().launch()
390
 
391
- # @gpu(cache=True)
392
- # @cpu(cache=True,nopython=True,parallel=True)
393
  @cpu(cache=True)
394
  def pre():
395
  try:
@@ -414,8 +398,6 @@ def pre():
414
  pipe.enable_vae_slicing()
415
  pipe.enable_free_init(method="butterworth", use_fast_sampling=fast)
416
 
417
- # @gpu(cache=True)
418
- # @cpu(cache=True,nopython=True,parallel=True)
419
  @cpu(cache=True)
420
  def entry():
421
  try:
 
115
 
116
  # functionality
117
 
118
+ @cpu(cache=True)
 
 
119
  def run(cmd):
120
  try:
121
  tx = cuda.threadIdx.x
 
135
  sys.exit()
136
  return result
137
 
138
+ @cpu(cache=True)
 
 
139
  def translate(args):
140
  try:
141
  tx = cuda.threadIdx.x
 
188
  print(ret)
189
  return ret
190
 
191
+ @cpu(cache=True)
 
 
192
  def generate_random_string(length):
193
  try:
194
  tx = cuda.threadIdx.x
 
204
  return ''.join(random.choice(characters) for _ in range(length))
205
 
206
  @gpu(cache=True)
 
 
207
  def Piper(image,positive,negative,motion):
208
  try:
209
  tx = cuda.threadIdx.x
 
254
  )
255
 
256
  @gpu(cache=True)
 
 
257
  def infer(pm):
258
  try:
259
  tx = cuda.threadIdx.x
 
285
  export_to_gif(out.frames[0],name,fps=fps)
286
  return name
287
 
288
+ @cpu(cache=True)
 
 
289
  def handle(i,m,p1,p2,result):
290
  try:
291
  tx = cuda.threadIdx.x
 
312
  ret = infer[32+ln,32](arr)
313
  return ret
314
 
 
 
315
  @cpu(cache=True)
316
  def ui():
317
  try:
 
374
  )
375
  demo.queue().launch()
376
 
 
 
377
  @cpu(cache=True)
378
  def pre():
379
  try:
 
398
  pipe.enable_vae_slicing()
399
  pipe.enable_free_init(method="butterworth", use_fast_sampling=fast)
400
 
 
 
401
  @cpu(cache=True)
402
  def entry():
403
  try: