Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ from diffusers import FluxFillPipeline
|
|
| 4 |
from diffusers.utils import load_image
|
| 5 |
from PIL import Image, ImageDraw
|
| 6 |
import numpy as np
|
| 7 |
-
import spaces
|
| 8 |
from huggingface_hub import hf_hub_download
|
| 9 |
|
| 10 |
pipe = FluxFillPipeline.from_pretrained(
|
|
@@ -118,7 +118,7 @@ def prepare_image_and_mask(image, width, height, overlap_percentage, resize_opti
|
|
| 118 |
|
| 119 |
return background, mask
|
| 120 |
|
| 121 |
-
@spaces.GPU
|
| 122 |
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)):
|
| 123 |
|
| 124 |
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)
|
|
|
|
| 4 |
from diffusers.utils import load_image
|
| 5 |
from PIL import Image, ImageDraw
|
| 6 |
import numpy as np
|
| 7 |
+
# import spaces
|
| 8 |
from huggingface_hub import hf_hub_download
|
| 9 |
|
| 10 |
pipe = FluxFillPipeline.from_pretrained(
|
|
|
|
| 118 |
|
| 119 |
return background, mask
|
| 120 |
|
| 121 |
+
# @spaces.GPU
|
| 122 |
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)):
|
| 123 |
|
| 124 |
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)
|