QY-H00
commited on
Commit
·
1734567
1
Parent(s):
a501328
update layout
Browse files
app.py
CHANGED
|
@@ -329,9 +329,9 @@ interpolation_size = None
|
|
| 329 |
with gr.Blocks(css="style.css") as demo:
|
| 330 |
gr.Markdown(title)
|
| 331 |
gr.Markdown(description)
|
| 332 |
-
with gr.
|
| 333 |
-
with gr.
|
| 334 |
-
with gr.Column(elem_classes="grid-item"):
|
| 335 |
prompt1 = gr.Text(
|
| 336 |
label="Prompt 1",
|
| 337 |
max_lines=3,
|
|
@@ -346,41 +346,40 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 346 |
interactive=True,
|
| 347 |
value="A photo of a beautiful lady",
|
| 348 |
)
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
|
| 362 |
-
|
| 363 |
|
| 364 |
-
|
| 365 |
-
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
)
|
| 384 |
|
| 385 |
with gr.Group():
|
| 386 |
result = gr.Gallery(label="Result", show_label=False, rows=1, columns=3)
|
|
|
|
| 329 |
with gr.Blocks(css="style.css") as demo:
|
| 330 |
gr.Markdown(title)
|
| 331 |
gr.Markdown(description)
|
| 332 |
+
with gr.Group():
|
| 333 |
+
with gr.Row():
|
| 334 |
+
with gr.Column(elem_classes="grid-item"):
|
| 335 |
prompt1 = gr.Text(
|
| 336 |
label="Prompt 1",
|
| 337 |
max_lines=3,
|
|
|
|
| 346 |
interactive=True,
|
| 347 |
value="A photo of a beautiful lady",
|
| 348 |
)
|
| 349 |
+
negative_prompt = gr.Text(
|
| 350 |
+
label="Negative prompt",
|
| 351 |
+
max_lines=3,
|
| 352 |
+
placeholder="Enter a Negative Prompt",
|
| 353 |
+
interactive=True,
|
| 354 |
+
value="nsfw, lowres, (bad), text, error, fewer, extra, missing, worst quality, jpeg artifacts, low quality, watermark, unfinished, displeasing, oldest, early, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract]",
|
| 355 |
+
)
|
| 356 |
+
guidance_prompt = gr.Text(
|
| 357 |
+
label="Guidance prompt (Optional)",
|
| 358 |
+
max_lines=3,
|
| 359 |
+
placeholder="Enter a Guidance Prompt",
|
| 360 |
+
interactive=True,
|
| 361 |
+
value="",
|
| 362 |
+
)
|
| 363 |
|
| 364 |
+
with gr.Group():
|
| 365 |
+
with gr.Row(elem_classes="flex-grow"):
|
| 366 |
+
image_prompt1 = gr.Image(label="Image Prompt 1 (Optional)", interactive=True, height=236, width=235)
|
| 367 |
+
image_prompt2 = gr.Image(label="Image Prompt 2 (Optional)", interactive=True, height=236, width=235)
|
| 368 |
+
with gr.Row(elem_classes="flex-grow"):
|
| 369 |
+
model_choice = gr.Dropdown(
|
| 370 |
+
["RealVis-v4.0", "SD1.4-512", "SD1.5-512", "SD2.1-768", "AOM3", "SDXL-1024", "Playground-XL-v2", "Juggernaut-XL-v9"],
|
| 371 |
+
label="Model",
|
| 372 |
+
value="RealVis-v4.0",
|
| 373 |
+
interactive=True,
|
| 374 |
+
info="All series are running on float16; SD2.1 does not support IP-Adapter; XL-Series takes longer time",
|
| 375 |
+
)
|
| 376 |
+
adapter_choice = gr.Dropdown(
|
| 377 |
+
["None", "IP-Adapter", "IP-Composition-Adapter"],
|
| 378 |
+
label="IP-Adapter",
|
| 379 |
+
value="None",
|
| 380 |
+
interactive=True,
|
| 381 |
+
info="Only set to IP-Adapter or IP-Composition-Adapter when using image prompt",
|
| 382 |
+
)
|
|
|
|
| 383 |
|
| 384 |
with gr.Group():
|
| 385 |
result = gr.Gallery(label="Result", show_label=False, rows=1, columns=3)
|