Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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['
|
70 |
-
mask = image_editor['
|
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.
|
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 |
|