Manjushri commited on
Commit
f35def7
1 Parent(s): 1d73717

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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, negative_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, negative_prompt=negative_prompt, image=src, mask_image=mask, num_inference_steps=5).images[0]
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"