Spaces:
Running
on
Zero
Running
on
Zero
Add title
Browse files- app.py +8 -2
- assets/title.md +16 -0
app.py
CHANGED
@@ -26,6 +26,12 @@ def preprocess_image(input_image, device):
|
|
26 |
return image
|
27 |
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
def preprocess_mask(input_mask, device):
|
30 |
# Split the channels
|
31 |
r, g, b, alpha = input_mask.split()
|
@@ -138,7 +144,7 @@ def remove(gradio_image, rm_guidance_scale=9, num_inference_steps=50, seed=42, s
|
|
138 |
|
139 |
title = """<h1 align="center">Object Remove</h1>"""
|
140 |
with gr.Blocks() as demo:
|
141 |
-
gr.HTML(title)
|
142 |
with gr.Row():
|
143 |
with gr.Column():
|
144 |
with gr.Accordion("Advanced Options", open=False):
|
@@ -158,7 +164,7 @@ with gr.Blocks() as demo:
|
|
158 |
)
|
159 |
seed = gr.Slider(
|
160 |
minimum=42,
|
161 |
-
maximum=
|
162 |
value=42,
|
163 |
step=1,
|
164 |
label="Seed"
|
|
|
26 |
return image
|
27 |
|
28 |
|
29 |
+
def load_description(fp):
|
30 |
+
with open(fp, 'r', encoding='utf-8') as f:
|
31 |
+
content = f.read()
|
32 |
+
return content
|
33 |
+
|
34 |
+
|
35 |
def preprocess_mask(input_mask, device):
|
36 |
# Split the channels
|
37 |
r, g, b, alpha = input_mask.split()
|
|
|
144 |
|
145 |
title = """<h1 align="center">Object Remove</h1>"""
|
146 |
with gr.Blocks() as demo:
|
147 |
+
gr.HTML(load_description("assets/title.md"))
|
148 |
with gr.Row():
|
149 |
with gr.Column():
|
150 |
with gr.Accordion("Advanced Options", open=False):
|
|
|
164 |
)
|
165 |
seed = gr.Slider(
|
166 |
minimum=42,
|
167 |
+
maximum=999999,
|
168 |
value=42,
|
169 |
step=1,
|
170 |
label="Seed"
|
assets/title.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div>
|
2 |
+
<div>
|
3 |
+
<div style="display: flex; justify-content: center; align-items: center; text-align: center; font-size: 40px;">
|
4 |
+
<b>Attentive Eraser: Unleashing Diffusion Model’s Object Removal Potential via Self-Attention Redirection Guidance</b>
|
5 |
+
</div>
|
6 |
+
<br>
|
7 |
+
<div style="display: flex; justify-content: center; align-items: center; text-align: center;">
|
8 |
+
<a href="https://arxiv.org/abs/2412.12974"><img src="https://img.shields.io/static/v1?label=Tech Report&message=Kolors&color=green"></a>  
|
9 |
+
<a href="https://github.com/Anonym0u3/AttentiveEraser/tree/master"><img src="https://img.shields.io/static/v1?label=Official Website&message=CN&color=red"></a>
|
10 |
+
</div>
|
11 |
+
<br>
|
12 |
+
<div style="display: flex; text-align: center; font-size: 14px; padding-right: 300px; padding-left: 300px;">
|
13 |
+
<strong>Disclaimer: </strong>This is an unofficial implementation of the given work.
|
14 |
+
</div>
|
15 |
+
</div>
|
16 |
+
</div>
|