lixiang46
commited on
Commit
·
20c2217
1
Parent(s):
e9f3ef9
update button
Browse files
app.py
CHANGED
|
@@ -163,6 +163,9 @@ css="""
|
|
| 163 |
margin: 0 auto;
|
| 164 |
max-width: 750px;
|
| 165 |
}
|
|
|
|
|
|
|
|
|
|
| 166 |
"""
|
| 167 |
|
| 168 |
def load_description(fp):
|
|
@@ -180,13 +183,6 @@ with gr.Blocks(css=css) as Kolors:
|
|
| 180 |
placeholder="Enter your prompt",
|
| 181 |
lines=2
|
| 182 |
)
|
| 183 |
-
with gr.Row():
|
| 184 |
-
controlnet_type = gr.Dropdown(
|
| 185 |
-
["Depth", "Canny"],
|
| 186 |
-
label = "Controlnet",
|
| 187 |
-
value="Depth",
|
| 188 |
-
visible=False
|
| 189 |
-
)
|
| 190 |
with gr.Row():
|
| 191 |
image = gr.Image(label="Image", type="pil")
|
| 192 |
with gr.Accordion("Advanced Settings", open=False):
|
|
@@ -243,8 +239,8 @@ with gr.Blocks(css=css) as Kolors:
|
|
| 243 |
value=1.0,
|
| 244 |
)
|
| 245 |
with gr.Row():
|
| 246 |
-
canny_button = gr.Button("Canny")
|
| 247 |
-
depth_button = gr.Button("Depth")
|
| 248 |
|
| 249 |
with gr.Column(elem_id="col-right"):
|
| 250 |
result = gr.Gallery(label="Result", show_label=False, columns=2)
|
|
@@ -266,16 +262,15 @@ with gr.Blocks(css=css) as Kolors:
|
|
| 266 |
label = "Depth"
|
| 267 |
)
|
| 268 |
|
| 269 |
-
|
| 270 |
canny_button.click(
|
| 271 |
fn = infer_canny,
|
| 272 |
-
inputs = [prompt, image,
|
| 273 |
outputs = [result]
|
| 274 |
)
|
| 275 |
|
| 276 |
depth_button.click(
|
| 277 |
fn = infer_depth,
|
| 278 |
-
inputs = [prompt, image,
|
| 279 |
outputs = [result]
|
| 280 |
)
|
| 281 |
|
|
|
|
| 163 |
margin: 0 auto;
|
| 164 |
max-width: 750px;
|
| 165 |
}
|
| 166 |
+
#button {
|
| 167 |
+
color: bule;
|
| 168 |
+
}
|
| 169 |
"""
|
| 170 |
|
| 171 |
def load_description(fp):
|
|
|
|
| 183 |
placeholder="Enter your prompt",
|
| 184 |
lines=2
|
| 185 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
with gr.Row():
|
| 187 |
image = gr.Image(label="Image", type="pil")
|
| 188 |
with gr.Accordion("Advanced Settings", open=False):
|
|
|
|
| 239 |
value=1.0,
|
| 240 |
)
|
| 241 |
with gr.Row():
|
| 242 |
+
canny_button = gr.Button("Canny", elem_id="button")
|
| 243 |
+
depth_button = gr.Button("Depth", elem_id="button")
|
| 244 |
|
| 245 |
with gr.Column(elem_id="col-right"):
|
| 246 |
result = gr.Gallery(label="Result", show_label=False, columns=2)
|
|
|
|
| 262 |
label = "Depth"
|
| 263 |
)
|
| 264 |
|
|
|
|
| 265 |
canny_button.click(
|
| 266 |
fn = infer_canny,
|
| 267 |
+
inputs = [prompt, image, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, controlnet_conditioning_scale, control_guidance_end, strength],
|
| 268 |
outputs = [result]
|
| 269 |
)
|
| 270 |
|
| 271 |
depth_button.click(
|
| 272 |
fn = infer_depth,
|
| 273 |
+
inputs = [prompt, image, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, controlnet_conditioning_scale, control_guidance_end, strength],
|
| 274 |
outputs = [result]
|
| 275 |
)
|
| 276 |
|