JiayiGuo821 commited on
Commit
d8ecbfe
1 Parent(s): 8964f12
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -249,7 +249,7 @@ def t2i_core(model, xt, emb, nemb, step=30, cfg_scale=7.5, return_list=False):
249
  ########
250
  # main #
251
  ########
252
- @spaces.GPU()
253
  class wrapper(object):
254
  def __init__(self,
255
  fp16=False,
@@ -526,7 +526,8 @@ class wrapper(object):
526
  im_list += im if isinstance(im, list) else [im]
527
 
528
  return im_list
529
-
 
530
  def run_iminvs(
531
  self, img, text,
532
  cfg_scale, step,
@@ -554,7 +555,8 @@ class wrapper(object):
554
  recon_output.save(ipath)
555
 
556
  return [recon_output]
557
-
 
558
  def run_imedit(
559
  self, img, txt_0,txt_1,
560
  threshold, cfg_scale, step,
@@ -582,7 +584,7 @@ class wrapper(object):
582
 
583
  return [edited_img]
584
 
585
-
586
  def run_imintp(
587
  self,
588
  img0, img1, txt0, txt1,
 
249
  ########
250
  # main #
251
  ########
252
+
253
  class wrapper(object):
254
  def __init__(self,
255
  fp16=False,
 
526
  im_list += im if isinstance(im, list) else [im]
527
 
528
  return im_list
529
+
530
+ @spaces.GPU()
531
  def run_iminvs(
532
  self, img, text,
533
  cfg_scale, step,
 
555
  recon_output.save(ipath)
556
 
557
  return [recon_output]
558
+
559
+ @spaces.GPU()
560
  def run_imedit(
561
  self, img, txt_0,txt_1,
562
  threshold, cfg_scale, step,
 
584
 
585
  return [edited_img]
586
 
587
+ @spaces.GPU()
588
  def run_imintp(
589
  self,
590
  img0, img1, txt0, txt1,