Spaces:
Sleeping
Sleeping
Commit
·
c6b5f03
1
Parent(s):
aee7dac
Updates
Browse files
app.py
CHANGED
@@ -174,6 +174,8 @@ def run_lora(prompt, image_input, image_strength, cfg_scale, steps, selected_ind
|
|
174 |
|
175 |
yield final_image, seed, gr.update(visible=False)
|
176 |
|
|
|
|
|
177 |
# Gradio interface
|
178 |
with gr.Blocks() as demo:
|
179 |
gr.Markdown("# Awaken Ones' Lora Previews")
|
@@ -211,9 +213,9 @@ with gr.Blocks() as demo:
|
|
211 |
|
212 |
with gr.Row():
|
213 |
with gr.Column():
|
214 |
-
steps = gr.Slider(minimum=1, maximum=100, value=
|
215 |
cfg_scale = gr.Slider(minimum=1, maximum=20, value=3.5, step=0.1, label="CFG Scale")
|
216 |
-
lora_scale = gr.Slider(minimum=0, maximum=1, value=
|
217 |
with gr.Column():
|
218 |
width = gr.Slider(minimum=256, maximum=1024, value=512, step=64, label="Width")
|
219 |
height = gr.Slider(minimum=256, maximum=1024, value=512, step=64, label="Height")
|
@@ -228,9 +230,8 @@ with gr.Blocks() as demo:
|
|
228 |
|
229 |
# Event handlers
|
230 |
gallery.select(update_selection, [width, height], [prompt, selected_lora, gr.State(), width, height])
|
231 |
-
randomize_seed.change(lambda x: gr.update(visible=not x), randomize_seed, seed_input)
|
232 |
-
|
233 |
-
|
234 |
-
cancel.click(lambda: None, None, None, cancels=[generate_event])
|
235 |
|
236 |
demo.queue().launch()
|
|
|
174 |
|
175 |
yield final_image, seed, gr.update(visible=False)
|
176 |
|
177 |
+
# ...
|
178 |
+
|
179 |
# Gradio interface
|
180 |
with gr.Blocks() as demo:
|
181 |
gr.Markdown("# Awaken Ones' Lora Previews")
|
|
|
213 |
|
214 |
with gr.Row():
|
215 |
with gr.Column():
|
216 |
+
steps = gr.Slider(minimum=1, maximum=100, value=25, step=1, label="Steps")
|
217 |
cfg_scale = gr.Slider(minimum=1, maximum=20, value=3.5, step=0.1, label="CFG Scale")
|
218 |
+
lora_scale = gr.Slider(minimum=0, maximum=1, value=1, step=0.05, label="LoRA Scale")
|
219 |
with gr.Column():
|
220 |
width = gr.Slider(minimum=256, maximum=1024, value=512, step=64, label="Width")
|
221 |
height = gr.Slider(minimum=256, maximum=1024, value=512, step=64, label="Height")
|
|
|
230 |
|
231 |
# Event handlers
|
232 |
gallery.select(update_selection, [width, height], [prompt, selected_lora, gr.State(), width, height])
|
233 |
+
randomize_seed.change(lambda x: gr.update(visible=not x), randomize_seed, seed_input)
|
234 |
+
generate.click(run_lora, inputs=[prompt, image_input, image_strength, cfg_scale, steps, gr.State(), randomize_seed, seed_input, width, height, lora_scale], outputs=[result, seed_output, progress_bar])
|
235 |
+
cancel.click(lambda: None, None, None, cancels=[generate])
|
|
|
236 |
|
237 |
demo.queue().launch()
|