Spaces:
Runtime error
Runtime error
update descri
Browse files
app.py
CHANGED
|
@@ -172,11 +172,13 @@ def create_demo(model_name: str):
|
|
| 172 |
description = r"""
|
| 173 |
<b>Official π€ Gradio demo</b> for <a href='https://github.com/Xilluill/KV-Edit' target='_blank'><b>KV-Edit: Training-Free Image Editing for Precise Background Preservation</b></a>.<br>
|
| 174 |
|
| 175 |
-
|
| 176 |
-
1οΈβ£ Upload your image that needs to be edited (The resolution is expected be less than 1360*768
|
| 177 |
2οΈβ£ Fill in your source prompt and use the brush tool to draw your mask area. <br>
|
| 178 |
3οΈβ£ Fill in your target prompt, then adjust the hyperparameters. <br>
|
| 179 |
4οΈβ£ Click the "Edit" button to generate your edited image! <br>
|
|
|
|
|
|
|
| 180 |
"""
|
| 181 |
article = r"""
|
| 182 |
If our work is helpful, please help to β the <a href='https://github.com/Xilluill/KV-Edit' target='_blank'>Github Repo</a>. Thanks!
|
|
@@ -189,8 +191,6 @@ def create_demo(model_name: str):
|
|
| 189 |
with gr.Blocks() as demo:
|
| 190 |
gr.HTML(title)
|
| 191 |
gr.Markdown(description)
|
| 192 |
-
gr.Markdown(article)
|
| 193 |
-
# gr.Markdown(badge)
|
| 194 |
|
| 195 |
with gr.Row():
|
| 196 |
with gr.Column():
|
|
@@ -222,6 +222,7 @@ def create_demo(model_name: str):
|
|
| 222 |
|
| 223 |
|
| 224 |
output_image = gr.Image(label="Generated Image")
|
|
|
|
| 225 |
edit_btn.click(
|
| 226 |
fn=edit,
|
| 227 |
inputs=[brush_canvas,
|
|
|
|
| 172 |
description = r"""
|
| 173 |
<b>Official π€ Gradio demo</b> for <a href='https://github.com/Xilluill/KV-Edit' target='_blank'><b>KV-Edit: Training-Free Image Editing for Precise Background Preservation</b></a>.<br>
|
| 174 |
|
| 175 |
+
π«π« <b>Here is editing steps:</b> (We highly recommend you run our code locally!π Only one inversion before multiple editing, very productive!) <br>
|
| 176 |
+
1οΈβ£ Upload your image that needs to be edited (The resolution is expected be less than 1360*768.) <br>
|
| 177 |
2οΈβ£ Fill in your source prompt and use the brush tool to draw your mask area. <br>
|
| 178 |
3οΈβ£ Fill in your target prompt, then adjust the hyperparameters. <br>
|
| 179 |
4οΈβ£ Click the "Edit" button to generate your edited image! <br>
|
| 180 |
+
|
| 181 |
+
ππ [<b>Important</b>] We suggest trying "re_init" and "attn_mask" only when the result is too similar to the original content (e.g. removing objects).<br>
|
| 182 |
"""
|
| 183 |
article = r"""
|
| 184 |
If our work is helpful, please help to β the <a href='https://github.com/Xilluill/KV-Edit' target='_blank'>Github Repo</a>. Thanks!
|
|
|
|
| 191 |
with gr.Blocks() as demo:
|
| 192 |
gr.HTML(title)
|
| 193 |
gr.Markdown(description)
|
|
|
|
|
|
|
| 194 |
|
| 195 |
with gr.Row():
|
| 196 |
with gr.Column():
|
|
|
|
| 222 |
|
| 223 |
|
| 224 |
output_image = gr.Image(label="Generated Image")
|
| 225 |
+
gr.Markdown(article)
|
| 226 |
edit_btn.click(
|
| 227 |
fn=edit,
|
| 228 |
inputs=[brush_canvas,
|