Severian commited on
Commit
14a4f29
·
verified ·
1 Parent(s): 00f7961

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -88
app.py CHANGED
@@ -329,7 +329,7 @@ with gr.Blocks(theme='Hev832/Applio') as blocks:
329
  info="List elements or styles you want to avoid in your QR code art.",
330
  )
331
 
332
- with gr.Accordion(label="Use Your Own Image as a Reference", open=False, visible=True) as init_image_acc:
333
  init_image = gr.Image(label="Reference Image", type="pil")
334
  with gr.Row():
335
  use_qr_code_as_init_image = gr.Checkbox(
@@ -419,7 +419,7 @@ with gr.Blocks(theme='Hev832/Applio') as blocks:
419
  sampler = gr.Dropdown(
420
  choices=list(SAMPLER_MAP.keys()),
421
  value="DPM++ Karras SDE",
422
- label="Art Style the AI Uses to Create the Image",
423
 
424
  )
425
  with gr.Accordion("Details on Art Style the AI Uses to Create the Image (Click For Explanation)", open=False):
@@ -459,92 +459,6 @@ with gr.Blocks(theme='Hev832/Applio') as blocks:
459
  """
460
  )
461
 
462
- with gr.Row():
463
- strength = gr.Slider(
464
- minimum=0.0,
465
- maximum=1.0,
466
- step=0.01,
467
- value=0.9,
468
- label="Artistic Freedom for the AI",
469
- )
470
- with gr.Accordion("See Details on how much artistic freedom the AI has", open=False):
471
- gr.Markdown(
472
- """
473
- **Artistic Freedom** controls how much the AI is allowed to change the QR code's look to match your description. It's like telling the AI how creative it can get with your QR code:
474
-
475
- - **Low settings (0.0-0.3)**: If you set this low, the AI will make small changes and your QR code will look more like a regular, plain QR code. This is useful if you want something that is still creative but not too wild, keeping it simple and easy to scan.
476
-
477
- - **Medium settings (0.4-0.7)**: Here, the AI will add more artistic touches but keep the QR code recognizable. You get the best of both worlds—your QR code will have some creative flair, but it will still be easy to scan. For most cases, setting it to **0.6** is a great way to keep the code functional and artistic.
478
-
479
- - **High settings (0.8-1.0)**: If you set this high, the AI will go all-out creative. The QR code will look amazing, but it might be difficult to scan because the art can start to take over the code. This setting is perfect if you're aiming for a highly creative piece of art and don't mind if it's a bit harder to scan. Start at **0.9** to explore creative but functional designs.
480
- """
481
- )
482
-
483
- with gr.Row():
484
- guidance_scale = gr.Slider(
485
- minimum=0.0,
486
- maximum=50.0,
487
- step=0.25,
488
- value=7.5,
489
- label="How closely the AI follows the Prompt",
490
- )
491
- with gr.Accordion("See Details on how closely the AI follows the Prompt", open=False):
492
- gr.Markdown(
493
- """
494
- **Follow the Prompt** tells the AI how closely it should follow your description when creating the QR code art. Think of it like giving the AI instructions on how strict or flexible it can be with your design ideas:
495
-
496
- - **Low settings (0-5)**: If you choose a lower value, the AI has more freedom to get creative on its own and may not stick too closely to your description. This is great if you want to see how the AI interprets your ideas in unexpected ways.
497
-
498
- - **Medium settings (5-15)**: This is a good balance where the AI will mostly follow your prompt but will also add some of its own creative touches. If you want to see some surprises but still want the design to look like what you described, start at around **7.5**.
499
-
500
- - **High settings (15+)**: If you choose a higher value, the AI will stick very closely to what you wrote in the description. This is good if you have a very specific idea and don't want the AI to change much. Just keep in mind that this might limit the AI's creativity.
501
-
502
- Start at **7.5** for a balanced approach where the AI follows your ideas but still adds some artistic flair.
503
- """
504
- )
505
-
506
- with gr.Row():
507
- sampler = gr.Dropdown(
508
- choices=list(SAMPLER_MAP.keys()),
509
- value="DPM++ Karras SDE",
510
- label="Art Style the AI uses to create the image",
511
- )
512
- with gr.Accordion("See Details on how the AI creates the image", open=False):
513
- gr.Markdown(
514
- """
515
- **Art Style** changes how the AI creates the image, using different methods (or "samplers"). Each method has a different effect on how detailed or artistic the final QR code looks:
516
-
517
- - **DPM++ Karras SDE**: This is a great all-around option for creating high-quality, detailed images. It's a good place to start if you want a balance of sharpness and creativity.
518
-
519
- - **Euler**: This method creates very sharp, detailed images, making the QR code look crisp and clear. Choose this if you want a precise, well-defined design.
520
-
521
- - **DDIM**: This method is better if you want the QR code to have a more artistic, abstract style. It's great for when you want the QR code to look like a piece of modern art.
522
-
523
- Feel free to experiment with different samplers to see what works best for the look you're going for!
524
- """
525
- )
526
-
527
- with gr.Row():
528
- seed = gr.Slider(
529
- minimum=-1,
530
- maximum=9999999999,
531
- step=1,
532
- value=-1,
533
- label="Creative Seed for the Image Generation",
534
- randomize=False,
535
- )
536
- with gr.Accordion("See Details on how the Creative Seed works to create new and unique images", open=False):
537
- gr.Markdown(
538
- """
539
- **Creative Seed** controls whether the AI creates a completely new design each time or sticks to a specific design. Think of it like a recipe: with the same seed number, you get the same "recipe" for your QR code every time.
540
-
541
- - **-1**: This setting makes the AI create something completely new every time you run it. Use this if you want to explore different design ideas with each attempt.
542
-
543
- - **Any other number**: If you set a specific number, the AI will always create the same image based on that number. This is useful if you find a design you like and want to recreate it exactly.
544
-
545
- Try **-1** if you want to explore and generate different designs. If you find something you really love, write down the seed number and use it again to recreate the same design.
546
- """
547
- )
548
  with gr.Accordion("QR Code Customization", open=True):
549
  bg_color = gr.ColorPicker(
550
  label="Background Color",
 
329
  info="List elements or styles you want to avoid in your QR code art.",
330
  )
331
 
332
+ with gr.Accordion(label="Use Your Own Image as a Reference", open=True, visible=True) as init_image_acc:
333
  init_image = gr.Image(label="Reference Image", type="pil")
334
  with gr.Row():
335
  use_qr_code_as_init_image = gr.Checkbox(
 
419
  sampler = gr.Dropdown(
420
  choices=list(SAMPLER_MAP.keys()),
421
  value="DPM++ Karras SDE",
422
+ label="Art Style Used to Create the Image",
423
 
424
  )
425
  with gr.Accordion("Details on Art Style the AI Uses to Create the Image (Click For Explanation)", open=False):
 
459
  """
460
  )
461
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
462
  with gr.Accordion("QR Code Customization", open=True):
463
  bg_color = gr.ColorPicker(
464
  label="Background Color",