Spaces:
Running
on
Zero
Running
on
Zero
@spaces.GPU
Browse files- scripts/anime.py +1 -0
- 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)
|