Upload app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,8 @@ from dc import (infer, _infer, pass_result, get_diffusers_model_list, get_sample
|
|
8 |
preset_quality, preset_styles, process_style_prompt, get_all_lora_tupled_list, update_loras, apply_lora_prompt,
|
9 |
download_my_lora, search_civitai_lora, update_civitai_selection, select_civitai_lora, search_civitai_lora_json,
|
10 |
get_t2i_model_info, get_civitai_tag, CIVITAI_SORT, CIVITAI_PERIOD, CIVITAI_BASEMODEL,
|
11 |
-
SCHEDULE_TYPE_OPTIONS, SCHEDULE_PREDICTION_TYPE_OPTIONS, preprocessor_tab, SDXL_TASK, TASK_MODEL_LIST
|
|
|
12 |
# Translator
|
13 |
from llmdolphin import (dolphin_respond_auto, dolphin_parse_simple,
|
14 |
get_llm_formats, get_dolphin_model_format, get_dolphin_models,
|
@@ -197,6 +198,7 @@ with gr.Blocks(fill_width=True, elem_id="container", css=css, delete_cache=(60,
|
|
197 |
|
198 |
with gr.Accordion("Other", open=True, visible=True):
|
199 |
task = gr.Dropdown(label="Task", choices=SDXL_TASK, value=TASK_MODEL_LIST[0])
|
|
|
200 |
|
201 |
with gr.Accordion("Translation Settings", open=False):
|
202 |
chatbot = gr.Chatbot(render_markdown=False, visible=False) # component for auto-translation
|
@@ -285,7 +287,7 @@ with gr.Blocks(fill_width=True, elem_id="container", css=css, delete_cache=(60,
|
|
285 |
triggers=[lora1.change, lora1_wt.change, lora2.change, lora2_wt.change, lora3.change, lora3_wt.change,
|
286 |
lora4.change, lora4_wt.change, lora5.change, lora5_wt.change, lora6.change, lora6_wt.change, lora7.change, lora7_wt.change],
|
287 |
fn=update_loras,
|
288 |
-
inputs=[prompt, lora1, lora1_wt, lora2, lora2_wt, lora3, lora3_wt, lora4, lora4_wt, lora5, lora5_wt, lora6, lora6_wt, lora7, lora7_wt],
|
289 |
outputs=[prompt, lora1, lora1_wt, lora1_info, lora1_copy, lora1_md,
|
290 |
lora2, lora2_wt, lora2_info, lora2_copy, lora2_md, lora3, lora3_wt, lora3_info, lora3_copy, lora3_md,
|
291 |
lora4, lora4_wt, lora4_info, lora4_copy, lora4_md, lora5, lora5_wt, lora5_info, lora5_copy, lora5_md,
|
|
|
8 |
preset_quality, preset_styles, process_style_prompt, get_all_lora_tupled_list, update_loras, apply_lora_prompt,
|
9 |
download_my_lora, search_civitai_lora, update_civitai_selection, select_civitai_lora, search_civitai_lora_json,
|
10 |
get_t2i_model_info, get_civitai_tag, CIVITAI_SORT, CIVITAI_PERIOD, CIVITAI_BASEMODEL,
|
11 |
+
SCHEDULE_TYPE_OPTIONS, SCHEDULE_PREDICTION_TYPE_OPTIONS, preprocessor_tab, SDXL_TASK, TASK_MODEL_LIST,
|
12 |
+
PROMPT_W_OPTIONS)
|
13 |
# Translator
|
14 |
from llmdolphin import (dolphin_respond_auto, dolphin_parse_simple,
|
15 |
get_llm_formats, get_dolphin_model_format, get_dolphin_models,
|
|
|
198 |
|
199 |
with gr.Accordion("Other", open=True, visible=True):
|
200 |
task = gr.Dropdown(label="Task", choices=SDXL_TASK, value=TASK_MODEL_LIST[0])
|
201 |
+
prompt_syntax = gr.Dropdown(label="Prompt Syntax", choices=PROMPT_W_OPTIONS, value=PROMPT_W_OPTIONS[1][1])
|
202 |
|
203 |
with gr.Accordion("Translation Settings", open=False):
|
204 |
chatbot = gr.Chatbot(render_markdown=False, visible=False) # component for auto-translation
|
|
|
287 |
triggers=[lora1.change, lora1_wt.change, lora2.change, lora2_wt.change, lora3.change, lora3_wt.change,
|
288 |
lora4.change, lora4_wt.change, lora5.change, lora5_wt.change, lora6.change, lora6_wt.change, lora7.change, lora7_wt.change],
|
289 |
fn=update_loras,
|
290 |
+
inputs=[prompt, prompt_syntax, lora1, lora1_wt, lora2, lora2_wt, lora3, lora3_wt, lora4, lora4_wt, lora5, lora5_wt, lora6, lora6_wt, lora7, lora7_wt],
|
291 |
outputs=[prompt, lora1, lora1_wt, lora1_info, lora1_copy, lora1_md,
|
292 |
lora2, lora2_wt, lora2_info, lora2_copy, lora2_md, lora3, lora3_wt, lora3_info, lora3_copy, lora3_md,
|
293 |
lora4, lora4_wt, lora4_info, lora4_copy, lora4_md, lora5, lora5_wt, lora5_info, lora5_copy, lora5_md,
|