QY-H00
commited on
Commit
·
a300ef0
1
Parent(s):
2ee2142
update
Browse files
app.py
CHANGED
|
@@ -331,21 +331,21 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 331 |
gr.Markdown(title)
|
| 332 |
gr.Markdown(description)
|
| 333 |
with gr.Group():
|
| 334 |
-
with gr.
|
| 335 |
-
with gr.
|
| 336 |
prompt1 = gr.Text(
|
| 337 |
label="Prompt 1",
|
| 338 |
max_lines=3,
|
| 339 |
placeholder="Enter the First Prompt",
|
| 340 |
interactive=True,
|
| 341 |
-
value="A
|
| 342 |
)
|
| 343 |
prompt2 = gr.Text(
|
| 344 |
label="Prompt 2",
|
| 345 |
max_lines=3,
|
| 346 |
placeholder="Enter the Second Prompt",
|
| 347 |
interactive=True,
|
| 348 |
-
value="A
|
| 349 |
)
|
| 350 |
negative_prompt = gr.Text(
|
| 351 |
label="Negative prompt",
|
|
@@ -354,19 +354,13 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 354 |
interactive=True,
|
| 355 |
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]",
|
| 356 |
)
|
| 357 |
-
|
| 358 |
-
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
|
| 364 |
-
|
| 365 |
-
with gr.Group():
|
| 366 |
-
with gr.Row():
|
| 367 |
-
image_prompt1 = gr.Image(label="Image Prompt 1 (Optional)", interactive=True)
|
| 368 |
-
image_prompt2 = gr.Image(label="Image Prompt 2 (Optional)", interactive=True)
|
| 369 |
-
with gr.Row():
|
| 370 |
model_choice = gr.Dropdown(
|
| 371 |
["RealVis-v4.0", "SD1.4-512", "SD1.5-512", "SD2.1-768", "AOM3", "SDXL-1024", "Playground-XL-v2", "Juggernaut-XL-v9"],
|
| 372 |
label="Model",
|
|
@@ -374,13 +368,18 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 374 |
interactive=True,
|
| 375 |
info="All series are running on float16; SD2.1 does not support IP-Adapter; XL-Series takes longer time",
|
| 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)
|
|
@@ -395,7 +394,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 395 |
minimum=3,
|
| 396 |
maximum=7,
|
| 397 |
step=1,
|
| 398 |
-
value=
|
| 399 |
info="Interpolation size includes the start and end images",
|
| 400 |
)
|
| 401 |
exploration_size = gr.Slider(
|
|
@@ -403,7 +402,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 403 |
minimum=7,
|
| 404 |
maximum=16,
|
| 405 |
step=1,
|
| 406 |
-
value=
|
| 407 |
info="Exploration size has to be larger than interpolation size",
|
| 408 |
)
|
| 409 |
with gr.Row():
|
|
|
|
| 331 |
gr.Markdown(title)
|
| 332 |
gr.Markdown(description)
|
| 333 |
with gr.Group():
|
| 334 |
+
with gr.Column():
|
| 335 |
+
with gr.Row():
|
| 336 |
prompt1 = gr.Text(
|
| 337 |
label="Prompt 1",
|
| 338 |
max_lines=3,
|
| 339 |
placeholder="Enter the First Prompt",
|
| 340 |
interactive=True,
|
| 341 |
+
value="A statue",
|
| 342 |
)
|
| 343 |
prompt2 = gr.Text(
|
| 344 |
label="Prompt 2",
|
| 345 |
max_lines=3,
|
| 346 |
placeholder="Enter the Second Prompt",
|
| 347 |
interactive=True,
|
| 348 |
+
value="A dragon",
|
| 349 |
)
|
| 350 |
negative_prompt = gr.Text(
|
| 351 |
label="Negative prompt",
|
|
|
|
| 354 |
interactive=True,
|
| 355 |
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]",
|
| 356 |
)
|
| 357 |
+
guidance_prompt = gr.Text(
|
| 358 |
+
label="Guidance prompt (Optional)",
|
| 359 |
+
max_lines=3,
|
| 360 |
+
placeholder="Enter a Guidance Prompt",
|
| 361 |
+
interactive=True,
|
| 362 |
+
value="",
|
| 363 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 364 |
model_choice = gr.Dropdown(
|
| 365 |
["RealVis-v4.0", "SD1.4-512", "SD1.5-512", "SD2.1-768", "AOM3", "SDXL-1024", "Playground-XL-v2", "Juggernaut-XL-v9"],
|
| 366 |
label="Model",
|
|
|
|
| 368 |
interactive=True,
|
| 369 |
info="All series are running on float16; SD2.1 does not support IP-Adapter; XL-Series takes longer time",
|
| 370 |
)
|
| 371 |
+
|
| 372 |
+
with gr.Group():
|
| 373 |
+
with gr.Row():
|
| 374 |
+
image_prompt1 = gr.Image(label="Image Prompt 1 (Optional)", interactive=True)
|
| 375 |
+
image_prompt2 = gr.Image(label="Image Prompt 2 (Optional)", interactive=True)
|
| 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)
|
|
|
|
| 394 |
minimum=3,
|
| 395 |
maximum=7,
|
| 396 |
step=1,
|
| 397 |
+
value=3,
|
| 398 |
info="Interpolation size includes the start and end images",
|
| 399 |
)
|
| 400 |
exploration_size = gr.Slider(
|
|
|
|
| 402 |
minimum=7,
|
| 403 |
maximum=16,
|
| 404 |
step=1,
|
| 405 |
+
value=7,
|
| 406 |
info="Exploration size has to be larger than interpolation size",
|
| 407 |
)
|
| 408 |
with gr.Row():
|