Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -715,6 +715,30 @@ input:focus, textarea:focus {
|
|
715 |
width: 100% !important;
|
716 |
max-width: 100% !important;
|
717 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
718 |
'''
|
719 |
|
720 |
|
@@ -745,65 +769,48 @@ with gr.Blocks(theme=custom_theme, css=css, delete_cache=(60, 3600)) as app:
|
|
745 |
preview=False
|
746 |
)
|
747 |
|
748 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
749 |
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
# LoRA 1
|
766 |
-
with gr.Column(scale=8):
|
767 |
-
with gr.Row():
|
768 |
-
with gr.Column(scale=0, min_width=50):
|
769 |
-
lora_image_1 = gr.Image(label="LoRA 1 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)
|
770 |
-
with gr.Column(scale=3, min_width=100):
|
771 |
-
selected_info_1 = gr.Markdown("Select a LoRA 1")
|
772 |
-
with gr.Column(scale=5, min_width=50):
|
773 |
-
lora_scale_1 = gr.Slider(label="LoRA 1 Scale", minimum=0, maximum=3, step=0.01, value=1.15)
|
774 |
-
with gr.Row():
|
775 |
-
remove_button_1 = gr.Button("Remove", size="sm")
|
776 |
|
777 |
-
# LoRA 2
|
778 |
-
with gr.Column(scale=8):
|
779 |
-
with gr.Row():
|
780 |
-
with gr.Column(scale=0, min_width=50):
|
781 |
-
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)
|
782 |
-
with gr.Column(scale=3, min_width=100):
|
783 |
-
selected_info_2 = gr.Markdown("Select a LoRA 2")
|
784 |
-
with gr.Column(scale=5, min_width=50):
|
785 |
-
lora_scale_2 = gr.Slider(label="LoRA 2 Scale", minimum=0, maximum=3, step=0.01, value=1.15)
|
786 |
-
with gr.Row():
|
787 |
-
remove_button_2 = gr.Button("Remove", size="sm")
|
788 |
|
789 |
-
# LoRA 3
|
790 |
-
with gr.Column(scale=8):
|
791 |
-
with gr.Row():
|
792 |
-
with gr.Column(scale=0, min_width=50):
|
793 |
-
lora_image_3 = gr.Image(label="LoRA 3 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)
|
794 |
-
with gr.Column(scale=3, min_width=100):
|
795 |
-
selected_info_3 = gr.Markdown("Select a LoRA 3")
|
796 |
-
with gr.Column(scale=5, min_width=50):
|
797 |
-
lora_scale_3 = gr.Slider(label="LoRA 3 Scale", minimum=0, maximum=3, step=0.01, value=1.15)
|
798 |
-
with gr.Row():
|
799 |
-
remove_button_3 = gr.Button("Remove", size="sm")
|
800 |
|
801 |
-
# Result and Progress Area
|
802 |
-
with gr.Column():
|
803 |
-
progress_bar = gr.Markdown(elem_id="progress", visible=False)
|
804 |
-
result = gr.Image(label="Generated Image", interactive=False)
|
805 |
-
with gr.Accordion("History", open=False):
|
806 |
-
history_gallery = gr.Gallery(label="History", columns=6, object_fit="contain", interactive=False)
|
807 |
|
808 |
# Advanced Settings
|
809 |
with gr.Row():
|
@@ -822,8 +829,8 @@ with gr.Blocks(theme=custom_theme, css=css, delete_cache=(60, 3600)) as app:
|
|
822 |
randomize_seed = gr.Checkbox(True, label="Randomize seed")
|
823 |
seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0, randomize=True)
|
824 |
|
825 |
-
|
826 |
-
with gr.Column():
|
827 |
with gr.Group():
|
828 |
with gr.Row(elem_id="custom_lora_structure"):
|
829 |
custom_lora = gr.Textbox(label="Custom LoRA", info="LoRA Hugging Face path or *.safetensors public URL", placeholder="ginipick/flux-lora-eric-cat", scale=3, min_width=150)
|
|
|
715 |
width: 100% !important;
|
716 |
max-width: 100% !important;
|
717 |
}
|
718 |
+
|
719 |
+
/* ํญ ์ปจํ
์ด๋ ์ฌ๋ฐฑ ์กฐ์ */
|
720 |
+
.tab-content {
|
721 |
+
padding: 0 20px !important;
|
722 |
+
max-width: 95% !important; /* ์ ์ฒด ๋๋น๋ฅผ 95%๋ก ์ ํ */
|
723 |
+
margin: 0 auto !important;
|
724 |
+
}
|
725 |
+
|
726 |
+
/* ์ฌ๋ผ์ด๋ ํฌ๊ธฐ ์กฐ์ */
|
727 |
+
.slider-container {
|
728 |
+
max-width: 95% !important;
|
729 |
+
}
|
730 |
+
|
731 |
+
/* ๋ฒํผ ํฌ๊ธฐ ์กฐ์ */
|
732 |
+
.button_total {
|
733 |
+
padding: 8px 15px !important;
|
734 |
+
font-size: 0.9em !important;
|
735 |
+
}
|
736 |
+
|
737 |
+
/* ์
๋ ฅ ํ๋ ์ฌ๋ฐฑ ์กฐ์ */
|
738 |
+
.input-container {
|
739 |
+
margin: 5px !important;
|
740 |
+
padding: 5px !important;
|
741 |
+
}
|
742 |
'''
|
743 |
|
744 |
|
|
|
769 |
preview=False
|
770 |
)
|
771 |
|
772 |
+
with gr.Tab(label="Generate"):
|
773 |
+
# Prompt and Generate Button - ๋น์จ ์กฐ์
|
774 |
+
with gr.Row():
|
775 |
+
with gr.Column(scale=4): # 3์์ 4๋ก ์ฆ๊ฐ
|
776 |
+
prompt = gr.Textbox(label="Prompt", lines=1, placeholder="Type a prompt after selecting a LoRA")
|
777 |
+
with gr.Column(scale=1):
|
778 |
+
generate_button = gr.Button("Generate", variant="primary", elem_classes=["button_total"])
|
779 |
+
|
780 |
+
# LoRA Selection Area - ๋น์จ ์กฐ์
|
781 |
+
with gr.Row(elem_id="loaded_loras"):
|
782 |
+
with gr.Column(scale=1, min_width=20): # min_width ๊ฐ์
|
783 |
+
randomize_button = gr.Button("๐ฒ", variant="secondary", scale=1, elem_id="random_btn")
|
784 |
+
|
785 |
+
# LoRA 1 - ๋น์จ ์กฐ์
|
786 |
+
with gr.Column(scale=6): # 8์์ 6์ผ๋ก ๊ฐ์
|
787 |
+
with gr.Row():
|
788 |
+
with gr.Column(scale=0, min_width=40): # min_width ๊ฐ์
|
789 |
+
lora_image_1 = gr.Image(label="LoRA 1 Image", interactive=False, min_width=40, width=40, show_label=False, show_share_button=False, show_download_button=False, show_fullscreen_button=False, height=40)
|
790 |
+
with gr.Column(scale=3, min_width=80): # min_width ๊ฐ์
|
791 |
+
selected_info_1 = gr.Markdown("Select a LoRA 1")
|
792 |
+
with gr.Column(scale=4, min_width=40): # min_width ๊ฐ์
|
793 |
+
lora_scale_1 = gr.Slider(label="LoRA 1 Scale", minimum=0, maximum=3, step=0.01, value=1.15)
|
794 |
+
with gr.Row():
|
795 |
+
remove_button_1 = gr.Button("Remove", size="sm")
|
796 |
|
797 |
+
# LoRA 2 - ๋น์จ ์กฐ์
|
798 |
+
with gr.Column(scale=6): # 8์์ 6์ผ๋ก ๊ฐ์
|
799 |
+
# (LoRA 2์ ๋ด๋ถ ๊ตฌ์กฐ๋ LoRA 1๊ณผ ๋์ผํ๊ฒ ์กฐ์ )
|
800 |
+
|
801 |
+
# LoRA 3 - ๋น์จ ์กฐ์
|
802 |
+
with gr.Column(scale=6): # 8์์ 6์ผ๋ก ๊ฐ์
|
803 |
+
# (LoRA 3์ ๋ด๋ถ ๊ตฌ์กฐ๋ LoRA 1๊ณผ ๋์ผํ๊ฒ ์กฐ์ )
|
804 |
+
|
805 |
+
# Result and Progress Area - ์ฌ๋ฐฑ ์ถ๊ฐ
|
806 |
+
with gr.Column(scale=1):
|
807 |
+
progress_bar = gr.Markdown(elem_id="progress", visible=False)
|
808 |
+
result = gr.Image(label="Generated Image", interactive=False)
|
809 |
+
with gr.Accordion("History", open=False):
|
810 |
+
history_gallery = gr.Gallery(label="History", columns=6, object_fit="contain", interactive=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
811 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
812 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
813 |
|
|
|
|
|
|
|
|
|
|
|
|
|
814 |
|
815 |
# Advanced Settings
|
816 |
with gr.Row():
|
|
|
829 |
randomize_seed = gr.Checkbox(True, label="Randomize seed")
|
830 |
seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0, randomize=True)
|
831 |
|
832 |
+
# Custom LoRA Section - ์ฌ๋ฐฑ ์ถ๊ฐ
|
833 |
+
with gr.Column(scale=1):
|
834 |
with gr.Group():
|
835 |
with gr.Row(elem_id="custom_lora_structure"):
|
836 |
custom_lora = gr.Textbox(label="Custom LoRA", info="LoRA Hugging Face path or *.safetensors public URL", placeholder="ginipick/flux-lora-eric-cat", scale=3, min_width=150)
|