Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -193,12 +193,13 @@ def infer(image, width, height, overlap_percentage, num_inference_steps, resize_
|
|
193 |
image = cnet_image,
|
194 |
num_inference_steps=num_inference_steps
|
195 |
):
|
196 |
-
|
197 |
-
|
198 |
image = image.convert('RGBA')
|
199 |
cnet_image.paste(image, (0,0), mask)
|
200 |
|
201 |
-
yield background, cnet_image
|
|
|
202 |
|
203 |
def clear_result():
|
204 |
"""Clears the result ImageSlider."""
|
@@ -323,11 +324,11 @@ with gr.Blocks() as demo:
|
|
323 |
preview_button = gr.Button("Preview alignment and mask")
|
324 |
|
325 |
with gr.Column():
|
326 |
-
|
327 |
-
result = ImageSlider(
|
328 |
-
|
329 |
-
|
330 |
-
)
|
331 |
history_gallery = gr.Gallery(label="History", columns=6, object_fit="contain", interactive=False)
|
332 |
preview_image = gr.Image(label="Preview")
|
333 |
|
|
|
193 |
image = cnet_image,
|
194 |
num_inference_steps=num_inference_steps
|
195 |
):
|
196 |
+
yield cnet_image, image
|
197 |
+
|
198 |
image = image.convert('RGBA')
|
199 |
cnet_image.paste(image, (0,0), mask)
|
200 |
|
201 |
+
# yield background, cnet_image
|
202 |
+
return cnet_image
|
203 |
|
204 |
def clear_result():
|
205 |
"""Clears the result ImageSlider."""
|
|
|
324 |
preview_button = gr.Button("Preview alignment and mask")
|
325 |
|
326 |
with gr.Column():
|
327 |
+
result = gr.Image(label="Generate Image", interactive=False)
|
328 |
+
# result = ImageSlider(
|
329 |
+
# interactive=False,
|
330 |
+
# label="Generated Image",
|
331 |
+
# )
|
332 |
history_gallery = gr.Gallery(label="History", columns=6, object_fit="contain", interactive=False)
|
333 |
preview_image = gr.Image(label="Preview")
|
334 |
|