Update app.py
Browse files
app.py
CHANGED
|
@@ -301,8 +301,18 @@ background: linear-gradient(135deg, #CCFED9, #95BAFF);
|
|
| 301 |
#reupload_wrapper button {
|
| 302 |
background: #553566 !important;
|
| 303 |
color: white !important;
|
| 304 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 305 |
}
|
|
|
|
|
|
|
| 306 |
|
| 307 |
|
| 308 |
footer, [class*="footer"], [class*="api"], [class*="settings"] {
|
|
@@ -347,7 +357,9 @@ with gr.Blocks(css=css) as demo:
|
|
| 347 |
label="Enable Drawing Doodle for Control", value=enable_doodle_arg,
|
| 348 |
info="After enabling this option, PhotoMaker will generate content based on your doodle on the canvas, driven by the T2I-Adapter (Quality may be decreased)",
|
| 349 |
)
|
| 350 |
-
with gr.Accordion("T2I-Adapter-Doodle (Optional)", visible=False) as doodle_space:
|
|
|
|
|
|
|
| 351 |
with gr.Row():
|
| 352 |
sketch_image = gr.Sketchpad(
|
| 353 |
label="Canvas",
|
|
@@ -373,7 +385,9 @@ with gr.Blocks(css=css) as demo:
|
|
| 373 |
step=0.1,
|
| 374 |
value=0.8,
|
| 375 |
)
|
| 376 |
-
with gr.Accordion(open=False, label="Advanced Options"):
|
|
|
|
|
|
|
| 377 |
negative_prompt = gr.Textbox(
|
| 378 |
label="Negative Prompt",
|
| 379 |
placeholder="low quality",
|
|
@@ -417,7 +431,9 @@ with gr.Blocks(css=css) as demo:
|
|
| 417 |
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
| 418 |
with gr.Column():
|
| 419 |
gallery = gr.Gallery(label="Generated Images")
|
| 420 |
-
usage_tips = gr.Markdown(label="Usage tips of PhotoMaker", value=tips ,visible=False)
|
|
|
|
|
|
|
| 421 |
|
| 422 |
files.upload(fn=swap_to_gallery, inputs=files, outputs=[uploaded_files, clear_button, files])
|
| 423 |
remove_and_reupload.click(fn=remove_back_to_files, outputs=[uploaded_files, clear_button, files])
|
|
|
|
| 301 |
#reupload_wrapper button {
|
| 302 |
background: #553566 !important;
|
| 303 |
color: white !important;
|
| 304 |
+
}
|
| 305 |
+
|
| 306 |
+
#usage_tips_section {
|
| 307 |
+
display: none !important;
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
|
| 311 |
+
#doodle_section, #advanced_section {
|
| 312 |
+
display: none !important;
|
| 313 |
}
|
| 314 |
+
|
| 315 |
+
|
| 316 |
|
| 317 |
|
| 318 |
footer, [class*="footer"], [class*="api"], [class*="settings"] {
|
|
|
|
| 357 |
label="Enable Drawing Doodle for Control", value=enable_doodle_arg,
|
| 358 |
info="After enabling this option, PhotoMaker will generate content based on your doodle on the canvas, driven by the T2I-Adapter (Quality may be decreased)",
|
| 359 |
)
|
| 360 |
+
with gr.Accordion("T2I-Adapter-Doodle (Optional)", visible=False, elem_id="doodle_section") as doodle_space:
|
| 361 |
+
|
| 362 |
+
#with gr.Accordion("T2I-Adapter-Doodle (Optional)", visible=False) as doodle_space:
|
| 363 |
with gr.Row():
|
| 364 |
sketch_image = gr.Sketchpad(
|
| 365 |
label="Canvas",
|
|
|
|
| 385 |
step=0.1,
|
| 386 |
value=0.8,
|
| 387 |
)
|
| 388 |
+
with gr.Accordion(open=False, label="Advanced Options", elem_id="advanced_section"):
|
| 389 |
+
|
| 390 |
+
# with gr.Accordion(open=False, label="Advanced Options"):
|
| 391 |
negative_prompt = gr.Textbox(
|
| 392 |
label="Negative Prompt",
|
| 393 |
placeholder="low quality",
|
|
|
|
| 431 |
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
| 432 |
with gr.Column():
|
| 433 |
gallery = gr.Gallery(label="Generated Images")
|
| 434 |
+
usage_tips = gr.Markdown(label="Usage tips of PhotoMaker", value=tips ,visible=False, elem_id="usage_tips_section")
|
| 435 |
+
|
| 436 |
+
# usage_tips = gr.Markdown(label="Usage tips of PhotoMaker", value=tips ,visible=False)
|
| 437 |
|
| 438 |
files.upload(fn=swap_to_gallery, inputs=files, outputs=[uploaded_files, clear_button, files])
|
| 439 |
remove_and_reupload.click(fn=remove_back_to_files, outputs=[uploaded_files, clear_button, files])
|