Spaces:
Running
Running
HatmanStack
commited on
Commit
·
d852611
1
Parent(s):
87f74e2
removed crop from inpainting added helper classes for Brush/Eraser
Browse files
app.py
CHANGED
@@ -18,7 +18,6 @@ def update_mask_editor(img):
|
|
18 |
return None
|
19 |
return create_padded_image(img)
|
20 |
|
21 |
-
|
22 |
def create_advanced_options():
|
23 |
|
24 |
negative_text = gr.Textbox(label="Negative Prompt", placeholder="Describe what not to include (1-1024 characters)", max_lines=1)
|
@@ -79,13 +78,13 @@ with gr.Blocks() as demo:
|
|
79 |
height="100%",
|
80 |
width="100%",
|
81 |
crop_size="1:1",
|
82 |
-
brush=
|
|
|
83 |
show_download_button=False,
|
84 |
show_share_button=False,
|
85 |
sources = ["upload"],
|
86 |
-
transforms =
|
87 |
layers = False,
|
88 |
-
canvas_size = [450,450],
|
89 |
label="Draw mask (black areas will be edited)",
|
90 |
)
|
91 |
|
@@ -118,7 +117,6 @@ with gr.Blocks() as demo:
|
|
118 |
show_share_button=False,
|
119 |
sources = ["upload"],
|
120 |
layers = False,
|
121 |
-
canvas_size = [450,450],
|
122 |
label="Crop the Image (transparent areas will be edited)"
|
123 |
)
|
124 |
gr.Button("Create Padding").click(fn=update_mask_editor, inputs=[mask_image], outputs=[mask_image])
|
|
|
18 |
return None
|
19 |
return create_padded_image(img)
|
20 |
|
|
|
21 |
def create_advanced_options():
|
22 |
|
23 |
negative_text = gr.Textbox(label="Negative Prompt", placeholder="Describe what not to include (1-1024 characters)", max_lines=1)
|
|
|
78 |
height="100%",
|
79 |
width="100%",
|
80 |
crop_size="1:1",
|
81 |
+
brush=gr.Brush(colors=["#000000"], default_size=50),
|
82 |
+
eraser=gr.Eraser(default_size=30),
|
83 |
show_download_button=False,
|
84 |
show_share_button=False,
|
85 |
sources = ["upload"],
|
86 |
+
transforms = (""),
|
87 |
layers = False,
|
|
|
88 |
label="Draw mask (black areas will be edited)",
|
89 |
)
|
90 |
|
|
|
117 |
show_share_button=False,
|
118 |
sources = ["upload"],
|
119 |
layers = False,
|
|
|
120 |
label="Crop the Image (transparent areas will be edited)"
|
121 |
)
|
122 |
gr.Button("Create Padding").click(fn=update_mask_editor, inputs=[mask_image], outputs=[mask_image])
|