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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -65,9 +65,9 @@ def image_to_image(ip, image, prompt, neg_prompt, width, height, ip_scale, stren
65
  @spaces.GPU(enable_queue=True)
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,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.Image(tool='sketch', type="pil"),
113
  inpaint_prompt = gr.Textbox(label='Prompt')
114
  inpaint_button = gr.Button("Generate")
115
 
 
65
  @spaces.GPU(enable_queue=True)
66
  def inpaint(ip, image_editor, prompt, neg_prompt, width, height, ip_scale, strength, guidance, steps):
67
  inpaint_pipeline.to("cuda")
68
+ print(image_editor)
69
+ image = image_editor['background']
70
+ mask = image_editor['composite']
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.ImageMask(type='pil')
113
  inpaint_prompt = gr.Textbox(label='Prompt')
114
  inpaint_button = gr.Button("Generate")
115