Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -648,9 +648,6 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as a
|
|
| 648 |
with gr.Column(scale=1):
|
| 649 |
generate_button = gr.Button("Generate", variant="primary", elem_classes=["button_total"])
|
| 650 |
|
| 651 |
-
|
| 652 |
-
|
| 653 |
-
|
| 654 |
with gr.Row(elem_id="loaded_loras"):
|
| 655 |
with gr.Column(scale=1, min_width=25):
|
| 656 |
randomize_button = gr.Button("🎲", variant="secondary", scale=1, elem_id="random_btn")
|
|
@@ -665,6 +662,17 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as a
|
|
| 665 |
with gr.Row():
|
| 666 |
remove_button_1 = gr.Button("Remove", size="sm")
|
| 667 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 668 |
with gr.Column(scale=8):
|
| 669 |
with gr.Row():
|
| 670 |
with gr.Column(scale=0, min_width=50):
|
|
@@ -675,7 +683,6 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as a
|
|
| 675 |
lora_scale_3 = gr.Slider(label="LoRA 3 Scale", minimum=0, maximum=3, step=0.01, value=1.15)
|
| 676 |
with gr.Row():
|
| 677 |
remove_button_3 = gr.Button("Remove", size="sm")
|
| 678 |
-
|
| 679 |
|
| 680 |
with gr.Row():
|
| 681 |
with gr.Column():
|
|
@@ -714,7 +721,7 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as a
|
|
| 714 |
randomize_seed = gr.Checkbox(True, label="Randomize seed")
|
| 715 |
seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0, randomize=True)
|
| 716 |
|
| 717 |
-
# 업스케일 관련 UI 추가
|
| 718 |
with gr.Row():
|
| 719 |
upscale_button = gr.Button("Upscale", interactive=False)
|
| 720 |
|
|
@@ -799,9 +806,6 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as a
|
|
| 799 |
outputs=[loras_state, gallery, selected_info_1, selected_info_2, selected_info_3, selected_indices, lora_scale_1, lora_scale_2, lora_scale_3, lora_image_1, lora_image_2, lora_image_3]
|
| 800 |
)
|
| 801 |
|
| 802 |
-
|
| 803 |
-
|
| 804 |
-
|
| 805 |
gr.on(
|
| 806 |
triggers=[generate_button.click, prompt.submit],
|
| 807 |
fn=run_lora,
|
|
@@ -813,8 +817,6 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as a
|
|
| 813 |
outputs=history_gallery,
|
| 814 |
)
|
| 815 |
|
| 816 |
-
|
| 817 |
-
|
| 818 |
upscale_input.upload(
|
| 819 |
lambda x: gr.update(interactive=x is not None),
|
| 820 |
inputs=[upscale_input],
|
|
@@ -842,7 +844,6 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as a
|
|
| 842 |
upscale_randomize_seed,
|
| 843 |
upscale_error
|
| 844 |
],
|
| 845 |
-
|
| 846 |
).then(
|
| 847 |
infer_upscale,
|
| 848 |
inputs=[
|
|
@@ -856,7 +857,6 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as a
|
|
| 856 |
outputs=[upscale_result, upscale_seed_output]
|
| 857 |
)
|
| 858 |
|
| 859 |
-
|
| 860 |
if __name__ == "__main__":
|
| 861 |
app.queue(max_size=20)
|
| 862 |
app.launch(debug=True)
|
|
|
|
| 648 |
with gr.Column(scale=1):
|
| 649 |
generate_button = gr.Button("Generate", variant="primary", elem_classes=["button_total"])
|
| 650 |
|
|
|
|
|
|
|
|
|
|
| 651 |
with gr.Row(elem_id="loaded_loras"):
|
| 652 |
with gr.Column(scale=1, min_width=25):
|
| 653 |
randomize_button = gr.Button("🎲", variant="secondary", scale=1, elem_id="random_btn")
|
|
|
|
| 662 |
with gr.Row():
|
| 663 |
remove_button_1 = gr.Button("Remove", size="sm")
|
| 664 |
|
| 665 |
+
with gr.Column(scale=8):
|
| 666 |
+
with gr.Row():
|
| 667 |
+
with gr.Column(scale=0, min_width=50):
|
| 668 |
+
lora_image_2 = gr.Image(label="LoRA 2 Image", interactive=False, min_width=50, width=50, show_label=False, show_share_button=False, show_download_button=False, show_fullscreen_button=False, height=50)
|
| 669 |
+
with gr.Column(scale=3, min_width=100):
|
| 670 |
+
selected_info_2 = gr.Markdown("Select a LoRA 2")
|
| 671 |
+
with gr.Column(scale=5, min_width=50):
|
| 672 |
+
lora_scale_2 = gr.Slider(label="LoRA 2 Scale", minimum=0, maximum=3, step=0.01, value=1.15)
|
| 673 |
+
with gr.Row():
|
| 674 |
+
remove_button_2 = gr.Button("Remove", size="sm")
|
| 675 |
+
|
| 676 |
with gr.Column(scale=8):
|
| 677 |
with gr.Row():
|
| 678 |
with gr.Column(scale=0, min_width=50):
|
|
|
|
| 683 |
lora_scale_3 = gr.Slider(label="LoRA 3 Scale", minimum=0, maximum=3, step=0.01, value=1.15)
|
| 684 |
with gr.Row():
|
| 685 |
remove_button_3 = gr.Button("Remove", size="sm")
|
|
|
|
| 686 |
|
| 687 |
with gr.Row():
|
| 688 |
with gr.Column():
|
|
|
|
| 721 |
randomize_seed = gr.Checkbox(True, label="Randomize seed")
|
| 722 |
seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0, randomize=True)
|
| 723 |
|
| 724 |
+
# 업스케일 관련 UI 추가
|
| 725 |
with gr.Row():
|
| 726 |
upscale_button = gr.Button("Upscale", interactive=False)
|
| 727 |
|
|
|
|
| 806 |
outputs=[loras_state, gallery, selected_info_1, selected_info_2, selected_info_3, selected_indices, lora_scale_1, lora_scale_2, lora_scale_3, lora_image_1, lora_image_2, lora_image_3]
|
| 807 |
)
|
| 808 |
|
|
|
|
|
|
|
|
|
|
| 809 |
gr.on(
|
| 810 |
triggers=[generate_button.click, prompt.submit],
|
| 811 |
fn=run_lora,
|
|
|
|
| 817 |
outputs=history_gallery,
|
| 818 |
)
|
| 819 |
|
|
|
|
|
|
|
| 820 |
upscale_input.upload(
|
| 821 |
lambda x: gr.update(interactive=x is not None),
|
| 822 |
inputs=[upscale_input],
|
|
|
|
| 844 |
upscale_randomize_seed,
|
| 845 |
upscale_error
|
| 846 |
],
|
|
|
|
| 847 |
).then(
|
| 848 |
infer_upscale,
|
| 849 |
inputs=[
|
|
|
|
| 857 |
outputs=[upscale_result, upscale_seed_output]
|
| 858 |
)
|
| 859 |
|
|
|
|
| 860 |
if __name__ == "__main__":
|
| 861 |
app.queue(max_size=20)
|
| 862 |
app.launch(debug=True)
|