Spaces:
Running
on
Zero
Running
on
Zero
reverse images
Browse files
app.py
CHANGED
@@ -77,7 +77,7 @@ def recolor_image(image):
|
|
77 |
controlnet_conditioning_scale=[1.0, 0.5],
|
78 |
control_guidance_end=[1.0, 0.9],
|
79 |
):
|
80 |
-
yield
|
81 |
|
82 |
image = image.convert("RGBA")
|
83 |
source_image = source_image.convert("RGBA")
|
@@ -91,7 +91,7 @@ def recolor_image(image):
|
|
91 |
|
92 |
merged_image = Image.alpha_composite(source_image, image)
|
93 |
|
94 |
-
yield
|
95 |
|
96 |
|
97 |
def clear_result():
|
@@ -128,10 +128,7 @@ with gr.Blocks(css=css) as demo:
|
|
128 |
image_mode="RGB",
|
129 |
)
|
130 |
|
131 |
-
result = ImageSlider(
|
132 |
-
interactive=False,
|
133 |
-
label="Generated Image",
|
134 |
-
)
|
135 |
|
136 |
run_button.click(
|
137 |
fn=clear_result,
|
|
|
77 |
controlnet_conditioning_scale=[1.0, 0.5],
|
78 |
control_guidance_end=[1.0, 0.9],
|
79 |
):
|
80 |
+
yield source_image, image
|
81 |
|
82 |
image = image.convert("RGBA")
|
83 |
source_image = source_image.convert("RGBA")
|
|
|
91 |
|
92 |
merged_image = Image.alpha_composite(source_image, image)
|
93 |
|
94 |
+
yield source_image, merged_image
|
95 |
|
96 |
|
97 |
def clear_result():
|
|
|
128 |
image_mode="RGB",
|
129 |
)
|
130 |
|
131 |
+
result = ImageSlider(interactive=False, label="Generated Image", type="pil")
|
|
|
|
|
|
|
132 |
|
133 |
run_button.click(
|
134 |
fn=clear_result,
|