Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -15,14 +15,14 @@ def resize(value,img):
|
|
15 |
img = img.resize((value,value))
|
16 |
return img
|
17 |
|
18 |
-
def predict(source_img, prompt
|
19 |
imageio.imwrite("data.png", source_img["image"])
|
20 |
imageio.imwrite("data_mask.png", source_img["mask"])
|
21 |
src = resize(768, "data.png")
|
22 |
src.save("src.png")
|
23 |
mask = resize(768, "data_mask.png")
|
24 |
mask.save("mask.png")
|
25 |
-
image = pipe(prompt=prompt,
|
26 |
return image
|
27 |
|
28 |
title="SDXL 1.0 Inpainting CPU"
|
|
|
15 |
img = img.resize((value,value))
|
16 |
return img
|
17 |
|
18 |
+
def predict(source_img, prompt):
|
19 |
imageio.imwrite("data.png", source_img["image"])
|
20 |
imageio.imwrite("data_mask.png", source_img["mask"])
|
21 |
src = resize(768, "data.png")
|
22 |
src.save("src.png")
|
23 |
mask = resize(768, "data_mask.png")
|
24 |
mask.save("mask.png")
|
25 |
+
image = pipe(prompt=prompt, image=src, mask_image=mask, num_inference_steps=10).images[0]
|
26 |
return image
|
27 |
|
28 |
title="SDXL 1.0 Inpainting CPU"
|