Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -114,7 +114,8 @@ def outpaintGen(
|
|
| 114 |
|
| 115 |
# Convert to grayscale
|
| 116 |
mask_image = mask_image.convert('L')
|
| 117 |
-
|
|
|
|
| 118 |
fix_width = (new_width // 16) * 16
|
| 119 |
fix_height = (new_height // 16) * 16
|
| 120 |
|
|
@@ -181,7 +182,7 @@ with gr.Blocks(theme="ocean", title="Flux.1 Fill dev", css=CSS) as demo:
|
|
| 181 |
],
|
| 182 |
outputs = [image_out, seed]
|
| 183 |
)
|
| 184 |
-
|
| 185 |
with gr.Tab("Outpainting"):
|
| 186 |
with gr.Row():
|
| 187 |
with gr.Column():
|
|
@@ -193,10 +194,10 @@ with gr.Blocks(theme="ocean", title="Flux.1 Fill dev", css=CSS) as demo:
|
|
| 193 |
image_exp = gr.Image(type="pil", label="Output", height=960)
|
| 194 |
with gr.Accordion("Advanced ⚙️", open=False):
|
| 195 |
with gr.Row():
|
| 196 |
-
overlap_top = gr.Number(label="Top", value=
|
| 197 |
-
overlap_right = gr.Number(label="Right", value=
|
| 198 |
-
overlap_bottom = gr.Number(label="Bottom", value=
|
| 199 |
-
overlap_left = gr.Number(label="Left", value=
|
| 200 |
op_guidance = gr.Slider(label="Guidance scale", minimum=1, maximum=50, value=30.0, step=0.1)
|
| 201 |
op_num_steps = gr.Slider(label="Steps", minimum=1, maximum=50, value=20, step=1)
|
| 202 |
op_seed = gr.Number(label="Seed", value=42, precision=0)
|
|
@@ -222,7 +223,7 @@ with gr.Blocks(theme="ocean", title="Flux.1 Fill dev", css=CSS) as demo:
|
|
| 222 |
],
|
| 223 |
outputs = [image_exp, op_seed]
|
| 224 |
)
|
| 225 |
-
|
| 226 |
|
| 227 |
if __name__ == "__main__":
|
| 228 |
demo.queue(api_open=False).launch(show_api=False, share=False)
|
|
|
|
| 114 |
|
| 115 |
# Convert to grayscale
|
| 116 |
mask_image = mask_image.convert('L')
|
| 117 |
+
mask_image = Image.eval(mask_image, lambda x: 255 - x)
|
| 118 |
+
|
| 119 |
fix_width = (new_width // 16) * 16
|
| 120 |
fix_height = (new_height // 16) * 16
|
| 121 |
|
|
|
|
| 182 |
],
|
| 183 |
outputs = [image_out, seed]
|
| 184 |
)
|
| 185 |
+
|
| 186 |
with gr.Tab("Outpainting"):
|
| 187 |
with gr.Row():
|
| 188 |
with gr.Column():
|
|
|
|
| 194 |
image_exp = gr.Image(type="pil", label="Output", height=960)
|
| 195 |
with gr.Accordion("Advanced ⚙️", open=False):
|
| 196 |
with gr.Row():
|
| 197 |
+
overlap_top = gr.Number(label="Top", value=64, precision=0)
|
| 198 |
+
overlap_right = gr.Number(label="Right", value=64, precision=0)
|
| 199 |
+
overlap_bottom = gr.Number(label="Bottom", value=64, precision=0)
|
| 200 |
+
overlap_left = gr.Number(label="Left", value=64, precision=0)
|
| 201 |
op_guidance = gr.Slider(label="Guidance scale", minimum=1, maximum=50, value=30.0, step=0.1)
|
| 202 |
op_num_steps = gr.Slider(label="Steps", minimum=1, maximum=50, value=20, step=1)
|
| 203 |
op_seed = gr.Number(label="Seed", value=42, precision=0)
|
|
|
|
| 223 |
],
|
| 224 |
outputs = [image_exp, op_seed]
|
| 225 |
)
|
| 226 |
+
|
| 227 |
|
| 228 |
if __name__ == "__main__":
|
| 229 |
demo.queue(api_open=False).launch(show_api=False, share=False)
|