Commit
•
d6802e8
1
Parent(s):
dad6779
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def update_selection(evt: gr.SelectData):
|
|
26 |
evt.index
|
27 |
)
|
28 |
|
29 |
-
@spaces.GPU
|
30 |
def run_lora(prompt, cfg_scale, steps, selected_index, seed, width, height, lora_scale, progress=gr.Progress(track_tqdm=True)):
|
31 |
if selected_index is None:
|
32 |
raise gr.Error("You must select a LoRA before proceeding.")
|
@@ -61,11 +61,14 @@ def run_lora(prompt, cfg_scale, steps, selected_index, seed, width, height, lora
|
|
61 |
with gr.Blocks(theme=gr.themes.Soft()) as app:
|
62 |
gr.Markdown("# FLUX.1 LoRA the Explorer")
|
63 |
selected_index = gr.State(None)
|
64 |
-
|
|
|
|
|
|
|
|
|
65 |
with gr.Row():
|
66 |
with gr.Column(scale=2):
|
67 |
result = gr.Image(label="Generated Image", height=768)
|
68 |
-
generate_button = gr.Button("Generate", variant="primary")
|
69 |
|
70 |
with gr.Column(scale=1):
|
71 |
gallery = gr.Gallery(
|
@@ -79,7 +82,6 @@ with gr.Blocks(theme=gr.themes.Soft()) as app:
|
|
79 |
with gr.Column():
|
80 |
prompt_title = gr.Markdown("### Click on a LoRA in the gallery to select it")
|
81 |
selected_info = gr.Markdown("")
|
82 |
-
prompt = gr.Textbox(label="Prompt", lines=3, placeholder="Type a prompt after selecting a LoRA")
|
83 |
#negative_prompt = gr.Textbox(label="Negative Prompt", lines=2, value="low quality, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry")
|
84 |
|
85 |
with gr.Column():
|
@@ -104,4 +106,4 @@ with gr.Blocks(theme=gr.themes.Soft()) as app:
|
|
104 |
)
|
105 |
|
106 |
app.queue()
|
107 |
-
app.launch()
|
|
|
26 |
evt.index
|
27 |
)
|
28 |
|
29 |
+
@spaces.GPU(duration=90)
|
30 |
def run_lora(prompt, cfg_scale, steps, selected_index, seed, width, height, lora_scale, progress=gr.Progress(track_tqdm=True)):
|
31 |
if selected_index is None:
|
32 |
raise gr.Error("You must select a LoRA before proceeding.")
|
|
|
61 |
with gr.Blocks(theme=gr.themes.Soft()) as app:
|
62 |
gr.Markdown("# FLUX.1 LoRA the Explorer")
|
63 |
selected_index = gr.State(None)
|
64 |
+
with gr.Row():
|
65 |
+
with gr.Column(scale=3):
|
66 |
+
prompt = gr.Textbox(label="Prompt", lines=1, placeholder="Type a prompt after selecting a LoRA")
|
67 |
+
with gr.Column(scale=1):
|
68 |
+
generate_button = gr.Button("Generate", variant="primary")
|
69 |
with gr.Row():
|
70 |
with gr.Column(scale=2):
|
71 |
result = gr.Image(label="Generated Image", height=768)
|
|
|
72 |
|
73 |
with gr.Column(scale=1):
|
74 |
gallery = gr.Gallery(
|
|
|
82 |
with gr.Column():
|
83 |
prompt_title = gr.Markdown("### Click on a LoRA in the gallery to select it")
|
84 |
selected_info = gr.Markdown("")
|
|
|
85 |
#negative_prompt = gr.Textbox(label="Negative Prompt", lines=2, value="low quality, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry")
|
86 |
|
87 |
with gr.Column():
|
|
|
106 |
)
|
107 |
|
108 |
app.queue()
|
109 |
+
app.launch()
|