Update app.py
Browse files
app.py
CHANGED
@@ -838,4 +838,70 @@ The MixGen3 service will be improved and developed through continuous updates. W
|
|
838 |
20. How can I provide feedback or suggestions?
|
839 |
Feedback or suggestions for the MixGen3 service are always welcome! Please leave your opinion by clicking the feedback button in the service, or contact us via email or social media. Your valuable opinions are a great help in improving the service. We will always keep our ears open to provide better service.
|
840 |
"""
|
841 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
838 |
20. How can I provide feedback or suggestions?
|
839 |
Feedback or suggestions for the MixGen3 service are always welcome! Please leave your opinion by clicking the feedback button in the service, or contact us via email or social media. Your valuable opinions are a great help in improving the service. We will always keep our ears open to provide better service.
|
840 |
"""
|
841 |
+
)
|
842 |
+
|
843 |
+
|
844 |
+
|
845 |
+
|
846 |
+
|
847 |
+
|
848 |
+
|
849 |
+
|
850 |
+
|
851 |
+
|
852 |
+
gallery.select(
|
853 |
+
update_selection,
|
854 |
+
inputs=[selected_indices, loras_state, width, height],
|
855 |
+
outputs=[prompt, selected_info_1, selected_info_2, selected_info_3, selected_indices, lora_scale_1, lora_scale_2, lora_scale_3, width, height, lora_image_1, lora_image_2, lora_image_3]
|
856 |
+
)
|
857 |
+
|
858 |
+
remove_button_1.click(
|
859 |
+
remove_lora_1,
|
860 |
+
inputs=[selected_indices, loras_state],
|
861 |
+
outputs=[selected_info_1, selected_info_2, selected_info_3, selected_indices, lora_scale_1, lora_scale_2, lora_scale_3, lora_image_1, lora_image_2, lora_image_3]
|
862 |
+
)
|
863 |
+
|
864 |
+
remove_button_2.click(
|
865 |
+
remove_lora_2,
|
866 |
+
inputs=[selected_indices, loras_state],
|
867 |
+
outputs=[selected_info_1, selected_info_2, selected_info_3, selected_indices, lora_scale_1, lora_scale_2, lora_scale_3, lora_image_1, lora_image_2, lora_image_3]
|
868 |
+
)
|
869 |
+
|
870 |
+
remove_button_3.click(
|
871 |
+
remove_lora_3,
|
872 |
+
inputs=[selected_indices, loras_state],
|
873 |
+
outputs=[selected_info_1, selected_info_2, selected_info_3, selected_indices, lora_scale_1, lora_scale_2, lora_scale_3, lora_image_1, lora_image_2, lora_image_3]
|
874 |
+
)
|
875 |
+
|
876 |
+
randomize_button.click(
|
877 |
+
randomize_loras,
|
878 |
+
inputs=[selected_indices, loras_state],
|
879 |
+
outputs=[selected_info_1, selected_info_2, selected_info_3, selected_indices, lora_scale_1, lora_scale_2, lora_scale_3, lora_image_1, lora_image_2, lora_image_3, prompt]
|
880 |
+
)
|
881 |
+
|
882 |
+
add_custom_lora_button.click(
|
883 |
+
add_custom_lora,
|
884 |
+
inputs=[custom_lora, selected_indices, loras_state],
|
885 |
+
outputs=[loras_state, gallery, selected_info_1, selected_info_2, selected_info_3, selected_indices, lora_scale_1, lora_scale_2, lora_scale_3, lora_image_1, lora_image_2, lora_image_3]
|
886 |
+
)
|
887 |
+
|
888 |
+
remove_custom_lora_button.click(
|
889 |
+
remove_custom_lora,
|
890 |
+
inputs=[selected_indices, loras_state],
|
891 |
+
outputs=[loras_state, gallery, selected_info_1, selected_info_2, selected_info_3, selected_indices, lora_scale_1, lora_scale_2, lora_scale_3, lora_image_1, lora_image_2, lora_image_3]
|
892 |
+
)
|
893 |
+
|
894 |
+
gr.on(
|
895 |
+
triggers=[generate_button.click, prompt.submit],
|
896 |
+
fn=run_lora,
|
897 |
+
inputs=[prompt, input_image, image_strength, cfg_scale, steps, selected_indices, lora_scale_1, lora_scale_2, lora_scale_3, randomize_seed, seed, width, height, loras_state],
|
898 |
+
outputs=[result, seed, progress_bar]
|
899 |
+
).then(
|
900 |
+
fn=lambda x, history: update_history(x, history) if x is not None else history,
|
901 |
+
inputs=[result, history_gallery],
|
902 |
+
outputs=history_gallery,
|
903 |
+
)
|
904 |
+
|
905 |
+
if __name__ == "__main__":
|
906 |
+
app.queue(max_size=20)
|
907 |
+
app.launch(debug=True)
|