Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -726,7 +726,8 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as a
|
|
| 726 |
upscale_result = gr.Image(label="Upscaled Image", type="pil")
|
| 727 |
upscale_seed_output = gr.Number(label="Seed Used", precision=0)
|
| 728 |
|
| 729 |
-
|
|
|
|
| 730 |
gallery.select(
|
| 731 |
update_selection,
|
| 732 |
inputs=[selected_indices, loras_state, width, height],
|
|
@@ -769,45 +770,39 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as a
|
|
| 769 |
outputs=history_gallery,
|
| 770 |
)
|
| 771 |
|
| 772 |
-
|
| 773 |
-
|
| 774 |
-
|
| 775 |
-
|
| 776 |
-
|
| 777 |
-
|
| 778 |
-
|
| 779 |
-
|
| 780 |
-
|
| 781 |
-
|
| 782 |
-
|
| 783 |
-
|
| 784 |
-
|
| 785 |
-
|
| 786 |
-
|
| 787 |
-
|
| 788 |
-
|
| 789 |
-
|
| 790 |
-
|
| 791 |
-
|
| 792 |
-
|
| 793 |
-
|
| 794 |
-
|
| 795 |
-
|
| 796 |
-
|
| 797 |
-
|
| 798 |
-
|
| 799 |
-
|
| 800 |
-
|
| 801 |
-
|
| 802 |
-
|
| 803 |
-
upscale_factor,
|
| 804 |
-
controlnet_conditioning_scale,
|
| 805 |
-
],
|
| 806 |
-
outputs=[upscale_result, upscale_seed_output],
|
| 807 |
-
)
|
| 808 |
-
|
| 809 |
-
|
| 810 |
|
| 811 |
if __name__ == "__main__":
|
| 812 |
app.queue(max_size=20)
|
| 813 |
-
app.launch(debug=True)
|
|
|
|
|
|
| 726 |
upscale_result = gr.Image(label="Upscaled Image", type="pil")
|
| 727 |
upscale_seed_output = gr.Number(label="Seed Used", precision=0)
|
| 728 |
|
| 729 |
+
|
| 730 |
+
|
| 731 |
gallery.select(
|
| 732 |
update_selection,
|
| 733 |
inputs=[selected_indices, loras_state, width, height],
|
|
|
|
| 770 |
outputs=history_gallery,
|
| 771 |
)
|
| 772 |
|
| 773 |
+
# 업스케일 버튼 이벤트 추가 (이 부분을 gr.Blocks 컨텍스트 내부로 이동)
|
| 774 |
+
upscale_button.click(
|
| 775 |
+
check_upscale_input,
|
| 776 |
+
inputs=[
|
| 777 |
+
upscale_input,
|
| 778 |
+
upscale_seed,
|
| 779 |
+
upscale_randomize_seed,
|
| 780 |
+
upscale_steps,
|
| 781 |
+
upscale_factor,
|
| 782 |
+
controlnet_conditioning_scale,
|
| 783 |
+
],
|
| 784 |
+
outputs=[
|
| 785 |
+
upscale_input,
|
| 786 |
+
upscale_seed,
|
| 787 |
+
upscale_randomize_seed,
|
| 788 |
+
upscale_steps,
|
| 789 |
+
upscale_factor,
|
| 790 |
+
controlnet_conditioning_scale,
|
| 791 |
+
]
|
| 792 |
+
).then(
|
| 793 |
+
infer_upscale,
|
| 794 |
+
inputs=[
|
| 795 |
+
upscale_seed,
|
| 796 |
+
upscale_randomize_seed,
|
| 797 |
+
upscale_input,
|
| 798 |
+
upscale_steps,
|
| 799 |
+
upscale_factor,
|
| 800 |
+
controlnet_conditioning_scale,
|
| 801 |
+
],
|
| 802 |
+
outputs=[upscale_result, upscale_seed_output],
|
| 803 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 804 |
|
| 805 |
if __name__ == "__main__":
|
| 806 |
app.queue(max_size=20)
|
| 807 |
+
app.launch(debug=True)
|
| 808 |
+
|