tonyassi commited on
Commit
c9c775f
·
verified ·
1 Parent(s): 960c701

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -66,8 +66,8 @@ def image_to_image(ip, image, prompt, neg_prompt, width, height, ip_scale, stren
66
  def inpaint(ip, image_editor, prompt, neg_prompt, width, height, ip_scale, strength, guidance, steps):
67
  inpaint_pipeline.to("cuda")
68
 
69
- image = image_editor['background']
70
- mask = image_editor['composite']
71
 
72
  ip.thumbnail((1024, 1024))
73
  image.thumbnail((1024, 1024))
@@ -109,7 +109,7 @@ with gr.Blocks() as demo:
109
  image_button = gr.Button("Generate")
110
  with gr.Tab("Inpainting"):
111
  inpaint_ip = gr.Image(label='IP-Adapter Image', type='pil')
112
- inpaint_editor = gr.ImageEditor(label='Image + Mask')
113
  inpaint_prompt = gr.Textbox(label='Prompt')
114
  inpaint_button = gr.Button("Generate")
115
 
 
66
  def inpaint(ip, image_editor, prompt, neg_prompt, width, height, ip_scale, strength, guidance, steps):
67
  inpaint_pipeline.to("cuda")
68
 
69
+ image = image_editor['image']
70
+ mask = image_editor['mask']
71
 
72
  ip.thumbnail((1024, 1024))
73
  image.thumbnail((1024, 1024))
 
109
  image_button = gr.Button("Generate")
110
  with gr.Tab("Inpainting"):
111
  inpaint_ip = gr.Image(label='IP-Adapter Image', type='pil')
112
+ inpaint_editor = gr.Image(tool='sketch', type="pil"),
113
  inpaint_prompt = gr.Textbox(label='Prompt')
114
  inpaint_button = gr.Button("Generate")
115