Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -22,14 +22,14 @@ def predict(source_img, prompt, strength):
|
|
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=
|
26 |
return image
|
27 |
|
28 |
title="SDXL Turbo Inpainting CPU"
|
29 |
description="Inpainting with SDXL Turbo <br><br> <b>Please use square .png image as input, 512x512, 768x768, or 1024x1024</b>"
|
30 |
gr.Interface(fn=predict, inputs=[gr.Image(source=("upload"), tool='sketch', label='Source Image'),
|
31 |
gr.Textbox(label='What you want the AI to Generate, 77 Token limit'),
|
32 |
-
gr.Slider(minimum=.5, maximum=1, value=.
|
33 |
outputs='image',
|
34 |
title=title,
|
35 |
description=description,
|
|
|
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=6, strength=strength, guidance_scale=0.0).images[0]
|
26 |
return image
|
27 |
|
28 |
title="SDXL Turbo Inpainting CPU"
|
29 |
description="Inpainting with SDXL Turbo <br><br> <b>Please use square .png image as input, 512x512, 768x768, or 1024x1024</b>"
|
30 |
gr.Interface(fn=predict, inputs=[gr.Image(source=("upload"), tool='sketch', label='Source Image'),
|
31 |
gr.Textbox(label='What you want the AI to Generate, 77 Token limit'),
|
32 |
+
gr.Slider(minimum=.5, maximum=1, value=.75, step=.025, label='Strength')],
|
33 |
outputs='image',
|
34 |
title=title,
|
35 |
description=description,
|