Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -187,6 +187,7 @@ def infer(edit_images,
|
|
| 187 |
true_cfg_scale=1.0,
|
| 188 |
rewrite_prompt=True,
|
| 189 |
progress=gr.Progress(track_tqdm=True)):
|
|
|
|
| 190 |
image = edit_images["background"]
|
| 191 |
mask = edit_images["layers"][0]
|
| 192 |
|
|
@@ -209,7 +210,7 @@ def infer(edit_images,
|
|
| 209 |
generator=torch.Generator(device="cuda").manual_seed(seed)
|
| 210 |
).images[0]
|
| 211 |
|
| 212 |
-
return result_image, seed
|
| 213 |
|
| 214 |
examples = [
|
| 215 |
"change the hat to red",
|
|
@@ -277,7 +278,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 277 |
)
|
| 278 |
run_button = gr.Button("Run")
|
| 279 |
|
| 280 |
-
result = gr.
|
| 281 |
|
| 282 |
with gr.Accordion("Advanced Settings", open=False):
|
| 283 |
|
|
|
|
| 187 |
true_cfg_scale=1.0,
|
| 188 |
rewrite_prompt=True,
|
| 189 |
progress=gr.Progress(track_tqdm=True)):
|
| 190 |
+
|
| 191 |
image = edit_images["background"]
|
| 192 |
mask = edit_images["layers"][0]
|
| 193 |
|
|
|
|
| 210 |
generator=torch.Generator(device="cuda").manual_seed(seed)
|
| 211 |
).images[0]
|
| 212 |
|
| 213 |
+
return [image,result_image], seed
|
| 214 |
|
| 215 |
examples = [
|
| 216 |
"change the hat to red",
|
|
|
|
| 278 |
)
|
| 279 |
run_button = gr.Button("Run")
|
| 280 |
|
| 281 |
+
result = gr.ImageSlider(label="Result", show_label=False)
|
| 282 |
|
| 283 |
with gr.Accordion("Advanced Settings", open=False):
|
| 284 |
|