Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from huggingface_hub import snapshot_download
|
|
9 |
from diffusers import FluxFillPipeline, FluxPriorReduxPipeline
|
10 |
import math
|
11 |
from utils.utils import get_bbox_from_mask, expand_bbox, pad_to_square, box2squre, crop_back, expand_image_mask
|
12 |
-
|
13 |
|
14 |
hf_token = os.getenv("HF_TOKEN")
|
15 |
|
@@ -56,7 +56,7 @@ image_mask_list.sort()
|
|
56 |
|
57 |
|
58 |
|
59 |
-
|
60 |
def run_local(base_image, base_mask, reference_image, ref_mask, seed, base_mask_option, ref_mask_option):
|
61 |
|
62 |
if base_mask_option == "Draw Mask":
|
|
|
9 |
from diffusers import FluxFillPipeline, FluxPriorReduxPipeline
|
10 |
import math
|
11 |
from utils.utils import get_bbox_from_mask, expand_bbox, pad_to_square, box2squre, crop_back, expand_image_mask
|
12 |
+
import spaces
|
13 |
|
14 |
hf_token = os.getenv("HF_TOKEN")
|
15 |
|
|
|
56 |
|
57 |
|
58 |
|
59 |
+
@spaces.GPU
|
60 |
def run_local(base_image, base_mask, reference_image, ref_mask, seed, base_mask_option, ref_mask_option):
|
61 |
|
62 |
if base_mask_option == "Draw Mask":
|