JohnyLahente
commited on
Commit
•
0a071c8
1
Parent(s):
46d23be
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from pipeline_flux_controlnet_inpaint import FluxControlNetInpaintingPipeline
|
|
8 |
from transformers import T5EncoderModel, CLIPTextModel
|
9 |
from PIL import Image, ImageDraw
|
10 |
import numpy as np
|
11 |
-
import spaces
|
12 |
from huggingface_hub import hf_hub_download
|
13 |
from optimum.quanto import freeze, qfloat8, quantize
|
14 |
|
@@ -136,7 +136,7 @@ def prepare_image_and_mask(image, width, height, overlap_percentage, resize_opti
|
|
136 |
|
137 |
return background, mask
|
138 |
|
139 |
-
|
140 |
def inpaint(image, width, height, overlap_percentage, num_inference_steps, resize_option, custom_resize_percentage, prompt_input, alignment, overlap_left, overlap_right, overlap_top, overlap_bottom, progress=gr.Progress(track_tqdm=True)):
|
141 |
|
142 |
background, mask = prepare_image_and_mask(image, width, height, overlap_percentage, resize_option, custom_resize_percentage, alignment, overlap_left, overlap_right, overlap_top, overlap_bottom)
|
|
|
8 |
from transformers import T5EncoderModel, CLIPTextModel
|
9 |
from PIL import Image, ImageDraw
|
10 |
import numpy as np
|
11 |
+
#import spaces
|
12 |
from huggingface_hub import hf_hub_download
|
13 |
from optimum.quanto import freeze, qfloat8, quantize
|
14 |
|
|
|
136 |
|
137 |
return background, mask
|
138 |
|
139 |
+
#@spaces.GPU
|
140 |
def inpaint(image, width, height, overlap_percentage, num_inference_steps, resize_option, custom_resize_percentage, prompt_input, alignment, overlap_left, overlap_right, overlap_top, overlap_bottom, progress=gr.Progress(track_tqdm=True)):
|
141 |
|
142 |
background, mask = prepare_image_and_mask(image, width, height, overlap_percentage, resize_option, custom_resize_percentage, alignment, overlap_left, overlap_right, overlap_top, overlap_bottom)
|