dreamdrop-art commited on
Commit
cb38527
1 Parent(s): 2642047

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -14
app.py CHANGED
@@ -499,12 +499,9 @@ with gr.Blocks(css=css) as demo:
499
  send_to_png_i2i.click(send_to_img2img_def, inputs=i2i_past_url, outputs=image_input)
500
  with gr.Tab("XL Inference"):
501
  with gr.Row():
502
- with gr.Column(scale=6):
503
- xl_model = gr.Dropdown(interactive=True, show_label=True, value="juggernautXL_v45.safetensors [e75f5471]",
504
- label="Stable Diffusion XL Checkpoint", choices=prodia_client.xl_list_models())
505
- gr.Markdown("""
506
- Generate with new XL-models
507
- """)
508
 
509
  with gr.Tab("txt2img"):
510
  with gr.Row():
@@ -528,8 +525,8 @@ with gr.Blocks(css=css) as demo:
528
 
529
  with gr.Row():
530
  with gr.Column(scale=1):
531
- xl_width = gr.Slider(label="Width", maximum=1536, minimum=768, value=1024, step=8)
532
- xl_height = gr.Slider(label="Height", maximum=1536, minimum=768, value=1024, step=8)
533
 
534
  with gr.Column(scale=1):
535
  xl_batch_size = gr.Slider(label="Batch Size", maximum=1, value=1)
@@ -541,7 +538,6 @@ with gr.Blocks(css=css) as demo:
541
  with gr.Column(scale=2):
542
  xl_image_output = gr.Gallery(show_label=False, rows=2, preview=True)
543
  xl_send_to_img2img = gr.Button(value="Send OUTPUT IMAGE to img2img")
544
- xl_send_to_png = gr.Button(value="Send OUTPUT IMAGE to PNG Info")
545
  xl_past_url = gr.Textbox(visible=False, interactive=False)
546
 
547
  xl_text_button.click(xl_txt2img, inputs=[xl_prompt, xl_negative_prompt, xl_model, xl_steps, xl_sampler, xl_cfg_scale, xl_width, xl_height,
@@ -570,8 +566,8 @@ with gr.Blocks(css=css) as demo:
570
  xl_i2i_steps = gr.Slider(label="Sampling Steps", minimum=1, maximum=25, value=20, step=1)
571
  with gr.Row():
572
  with gr.Column(scale=1):
573
- xl_i2i_width = gr.Slider(label="Width", maximum=1536, minimum=768, value=1024, step=8)
574
- xl_i2i_height = gr.Slider(label="Height", maximum=1536, minimum=768, value=1024, step=8)
575
 
576
  with gr.Column(scale=1):
577
  xl_i2i_batch_size = gr.Slider(label="Batch Size", maximum=1, value=1)
@@ -584,15 +580,12 @@ with gr.Blocks(css=css) as demo:
584
 
585
  with gr.Column(scale=2):
586
  xl_i2i_image_output = gr.Gallery(show_label=False, rows=2, preview=True)
587
- xl_send_to_png_i2i = gr.Button(value="Send INPUT IMAGE to PNG Info")
588
  xl_i2i_past_url = gr.Textbox(visible=False, interactive=False)
589
 
590
  xl_i2i_text_button.click(xl_img2img, inputs=[xl_i2i_image_input, xl_i2i_denoising, xl_i2i_prompt, xl_i2i_negative_prompt,
591
  xl_model, xl_i2i_steps, xl_i2i_sampler, xl_i2i_cfg_scale, xl_i2i_width, xl_i2i_height,
592
  xl_i2i_seed], outputs=[xl_i2i_image_output, xl_i2i_past_url], concurrency_limit=64)
593
  xl_send_to_img2img.click(send_to_img2img_def, inputs=xl_past_url, outputs=xl_i2i_image_input)
594
- xl_send_to_png.click(send_to_img2img_def, inputs=xl_past_url, outputs=image_input)
595
- xl_send_to_png_i2i.click(send_to_img2img_def, inputs=xl_i2i_past_url, outputs=image_input)
596
  with gr.Tab("HuggingFace Inference"):
597
  with gr.Row():
598
  hf_model = gr.Dropdown(label="HuggingFace checkpoint", choices=["runwayml/stable-diffusion-v1-5", "stabilityai/stable-diffusion-2-1", "dataautogpt3/OpenDalleV1.1", "CompVis/stable-diffusion-v1-4", "playgroundai/playground-v2-1024px-aesthetic", "prompthero/openjourney", "openskyml/dreamdrop-v1", "SG161222/Realistic_Vision_V1.4", "digiplay/AbsoluteReality_v1.8.1", "openskyml/dalle-3-xl", "Lykon/dreamshaper-7", "Pclanglais/Mickey-1928"], value="runwayml/stable-diffusion-v1-5", allow_custom_value=True, interactive=True)
 
499
  send_to_png_i2i.click(send_to_img2img_def, inputs=i2i_past_url, outputs=image_input)
500
  with gr.Tab("XL Inference"):
501
  with gr.Row():
502
+ xl_model = gr.Dropdown(interactive=True, show_label=True, value="juggernautXL_v45.safetensors [e75f5471]",
503
+ label="Stable Diffusion XL Checkpoint", choices=prodia_client.xl_list_models())
504
+ gr.Markdown("Generate with new XL-models")
 
 
 
505
 
506
  with gr.Tab("txt2img"):
507
  with gr.Row():
 
525
 
526
  with gr.Row():
527
  with gr.Column(scale=1):
528
+ xl_width = gr.Slider(label="Width", maximum=1024, minimum=640, value=1024, step=8)
529
+ xl_height = gr.Slider(label="Height", maximum=1024, minimum=0640, value=1024, step=8)
530
 
531
  with gr.Column(scale=1):
532
  xl_batch_size = gr.Slider(label="Batch Size", maximum=1, value=1)
 
538
  with gr.Column(scale=2):
539
  xl_image_output = gr.Gallery(show_label=False, rows=2, preview=True)
540
  xl_send_to_img2img = gr.Button(value="Send OUTPUT IMAGE to img2img")
 
541
  xl_past_url = gr.Textbox(visible=False, interactive=False)
542
 
543
  xl_text_button.click(xl_txt2img, inputs=[xl_prompt, xl_negative_prompt, xl_model, xl_steps, xl_sampler, xl_cfg_scale, xl_width, xl_height,
 
566
  xl_i2i_steps = gr.Slider(label="Sampling Steps", minimum=1, maximum=25, value=20, step=1)
567
  with gr.Row():
568
  with gr.Column(scale=1):
569
+ xl_i2i_width = gr.Slider(label="Width", maximum=1024, minimum=640, value=1024, step=8)
570
+ xl_i2i_height = gr.Slider(label="Height", maximum=1024, minimum=640, value=1024, step=8)
571
 
572
  with gr.Column(scale=1):
573
  xl_i2i_batch_size = gr.Slider(label="Batch Size", maximum=1, value=1)
 
580
 
581
  with gr.Column(scale=2):
582
  xl_i2i_image_output = gr.Gallery(show_label=False, rows=2, preview=True)
 
583
  xl_i2i_past_url = gr.Textbox(visible=False, interactive=False)
584
 
585
  xl_i2i_text_button.click(xl_img2img, inputs=[xl_i2i_image_input, xl_i2i_denoising, xl_i2i_prompt, xl_i2i_negative_prompt,
586
  xl_model, xl_i2i_steps, xl_i2i_sampler, xl_i2i_cfg_scale, xl_i2i_width, xl_i2i_height,
587
  xl_i2i_seed], outputs=[xl_i2i_image_output, xl_i2i_past_url], concurrency_limit=64)
588
  xl_send_to_img2img.click(send_to_img2img_def, inputs=xl_past_url, outputs=xl_i2i_image_input)
 
 
589
  with gr.Tab("HuggingFace Inference"):
590
  with gr.Row():
591
  hf_model = gr.Dropdown(label="HuggingFace checkpoint", choices=["runwayml/stable-diffusion-v1-5", "stabilityai/stable-diffusion-2-1", "dataautogpt3/OpenDalleV1.1", "CompVis/stable-diffusion-v1-4", "playgroundai/playground-v2-1024px-aesthetic", "prompthero/openjourney", "openskyml/dreamdrop-v1", "SG161222/Realistic_Vision_V1.4", "digiplay/AbsoluteReality_v1.8.1", "openskyml/dalle-3-xl", "Lykon/dreamshaper-7", "Pclanglais/Mickey-1928"], value="runwayml/stable-diffusion-v1-5", allow_custom_value=True, interactive=True)