yeq6x commited on
Commit
099b913
โ€ข
1 Parent(s): e7d7d62

@spaces.GPU

Browse files
Files changed (2) hide show
  1. scripts/anime.py +1 -0
  2. scripts/process_utils.py +1 -0
scripts/anime.py CHANGED
@@ -28,6 +28,7 @@ def init_model(use_local=False):
28
  model.eval()
29
 
30
  # numpy้…ๅˆ—ใฎ็”ปๅƒใ‚’ๅ—ใ‘ๅ–ใ‚Šใ€็ทš็”ปใ‚’็”Ÿๆˆใ—ใฆnumpy้…ๅˆ—ใง่ฟ”ใ™
 
31
  def generate_sketch(image, clahe_clip=-1, load_size=512):
32
  """
33
  Generate sketch image from input image
 
28
  model.eval()
29
 
30
  # numpy้…ๅˆ—ใฎ็”ปๅƒใ‚’ๅ—ใ‘ๅ–ใ‚Šใ€็ทš็”ปใ‚’็”Ÿๆˆใ—ใฆnumpy้…ๅˆ—ใง่ฟ”ใ™
31
+ @spaces.GPU
32
  def generate_sketch(image, clahe_clip=-1, load_size=512):
33
  """
34
  Generate sketch image from input image
scripts/process_utils.py CHANGED
@@ -51,6 +51,7 @@ def initialize(_use_local=False, use_gpu=False, use_dotenv=False):
51
  sotai_gen_pipe = initialize_sotai_model()
52
  refine_gen_pipe = initialize_refine_model()
53
 
 
54
  def load_lora(pipeline, lora_path, alpha=0.75):
55
  pipeline.load_lora_weights(lora_path)
56
  pipeline.fuse_lora(lora_scale=alpha)
 
51
  sotai_gen_pipe = initialize_sotai_model()
52
  refine_gen_pipe = initialize_refine_model()
53
 
54
+ @spaces.GPU
55
  def load_lora(pipeline, lora_path, alpha=0.75):
56
  pipeline.load_lora_weights(lora_path)
57
  pipeline.fuse_lora(lora_scale=alpha)