Spaces:
Sleeping
Sleeping
Commit
·
609484b
1
Parent(s):
0baa9f7
Updates
Browse files
app.py
CHANGED
@@ -213,9 +213,9 @@ with gr.Blocks() as demo:
|
|
213 |
|
214 |
with gr.Row():
|
215 |
with gr.Column():
|
216 |
-
steps = gr.Slider(minimum=1, maximum=100, value=
|
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=
|
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,8 +230,8 @@ with gr.Blocks() as demo:
|
|
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 |
-
|
235 |
-
cancel.click(lambda: None, None, None, cancels=[
|
236 |
|
237 |
demo.queue().launch()
|
|
|
213 |
|
214 |
with gr.Row():
|
215 |
with gr.Column():
|
216 |
+
steps = gr.Slider(minimum=1, maximum=100, value=28, 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=0.8, 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()
|