Spaces:
Running
on
Zero
Running
on
Zero
@spaces.GPU
Browse files- scripts/process_utils.py +0 -4
scripts/process_utils.py
CHANGED
@@ -35,7 +35,6 @@ def ensure_rgb(image):
|
|
35 |
return image.convert('RGB')
|
36 |
return image
|
37 |
|
38 |
-
@spaces.GPU
|
39 |
def initialize(_use_local=False, use_gpu=False, use_dotenv=False):
|
40 |
if use_dotenv:
|
41 |
load_dotenv()
|
@@ -51,12 +50,10 @@ 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 |
-
@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)
|
58 |
|
59 |
-
@spaces.GPU
|
60 |
def initialize_sotai_model():
|
61 |
global device, torch_dtype
|
62 |
|
@@ -111,7 +108,6 @@ def initialize_sotai_model():
|
|
111 |
|
112 |
return sotai_gen_pipe
|
113 |
|
114 |
-
@spaces.GPU
|
115 |
def initialize_refine_model():
|
116 |
global device, torch_dtype
|
117 |
|
|
|
35 |
return image.convert('RGB')
|
36 |
return image
|
37 |
|
|
|
38 |
def initialize(_use_local=False, use_gpu=False, use_dotenv=False):
|
39 |
if use_dotenv:
|
40 |
load_dotenv()
|
|
|
50 |
sotai_gen_pipe = initialize_sotai_model()
|
51 |
refine_gen_pipe = initialize_refine_model()
|
52 |
|
|
|
53 |
def load_lora(pipeline, lora_path, alpha=0.75):
|
54 |
pipeline.load_lora_weights(lora_path)
|
55 |
pipeline.fuse_lora(lora_scale=alpha)
|
56 |
|
|
|
57 |
def initialize_sotai_model():
|
58 |
global device, torch_dtype
|
59 |
|
|
|
108 |
|
109 |
return sotai_gen_pipe
|
110 |
|
|
|
111 |
def initialize_refine_model():
|
112 |
global device, torch_dtype
|
113 |
|