Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -424,8 +424,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 424 |
|
| 425 |
with gr.Row():
|
| 426 |
invert_button = gr.Button("⬆️ Invert")
|
| 427 |
-
|
| 428 |
-
file_output = gr.File(label="Download Sampled/Inverted Model", container=True, interactive=False)
|
| 429 |
|
| 430 |
|
| 431 |
with gr.Column():
|
|
@@ -475,29 +474,24 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 475 |
|
| 476 |
gr.Markdown("""<div style="text-align: justify;"> After sampling a new model or inverting, you can download the model below.""")
|
| 477 |
|
| 478 |
-
|
| 479 |
-
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
-
|
| 486 |
inputs=[input_image, pcs, epochs, weight_decay,lr],
|
| 487 |
outputs = [gallery, file_output])
|
| 488 |
|
| 489 |
|
| 490 |
-
|
| 491 |
|
| 492 |
|
| 493 |
-
|
| 494 |
fn=edit_inference, inputs=[prompt, negative_prompt, cfg, steps, seed, injection_step, a1, a2, a3, a4], outputs=[gallery]
|
| 495 |
)
|
| 496 |
file_input.change(fn=file_upload, inputs=file_input, outputs = input_image)
|
| 497 |
|
| 498 |
-
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
|
| 502 |
-
|
| 503 |
-
demo.queue().launch()
|
|
|
|
| 424 |
|
| 425 |
with gr.Row():
|
| 426 |
invert_button = gr.Button("⬆️ Invert")
|
| 427 |
+
|
|
|
|
| 428 |
|
| 429 |
|
| 430 |
with gr.Column():
|
|
|
|
| 474 |
|
| 475 |
gr.Markdown("""<div style="text-align: justify;"> After sampling a new model or inverting, you can download the model below.""")
|
| 476 |
|
| 477 |
+
with gr.Row():
|
| 478 |
+
file_output = gr.File(label="Download Sampled/Inverted Model", container=True, interactive=False)
|
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
+
invert_button.click(fn=run_inversion,
|
| 485 |
inputs=[input_image, pcs, epochs, weight_decay,lr],
|
| 486 |
outputs = [gallery, file_output])
|
| 487 |
|
| 488 |
|
| 489 |
+
sample.click(fn=sample_then_run, outputs=[gallery, file_output])
|
| 490 |
|
| 491 |
|
| 492 |
+
submit.click(
|
| 493 |
fn=edit_inference, inputs=[prompt, negative_prompt, cfg, steps, seed, injection_step, a1, a2, a3, a4], outputs=[gallery]
|
| 494 |
)
|
| 495 |
file_input.change(fn=file_upload, inputs=file_input, outputs = input_image)
|
| 496 |
|
| 497 |
+
demo.queue().launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|