This commit is contained in:
lllyasviel 2023-11-15 01:22:37 -08:00
parent 6769ab0f9b
commit 861c8d38df
6 changed files with 27 additions and 32 deletions

View File

@ -1 +1 @@
version = '2.1.809' version = '2.1.810'

View File

@ -42,32 +42,7 @@
"Speed": "Speed", "Speed": "Speed",
"Quality": "Quality", "Quality": "Quality",
"Aspect Ratios": "Aspect Ratios", "Aspect Ratios": "Aspect Ratios",
"896\u00d71152": "896\u00d71152",
"width \u00d7 height": "width \u00d7 height", "width \u00d7 height": "width \u00d7 height",
"704\u00d71408": "704\u00d71408",
"704\u00d71344": "704\u00d71344",
"768\u00d71344": "768\u00d71344",
"768\u00d71280": "768\u00d71280",
"832\u00d71216": "832\u00d71216",
"832\u00d71152": "832\u00d71152",
"896\u00d71088": "896\u00d71088",
"960\u00d71088": "960\u00d71088",
"960\u00d71024": "960\u00d71024",
"1024\u00d71024": "1024\u00d71024",
"1024\u00d7960": "1024\u00d7960",
"1088\u00d7960": "1088\u00d7960",
"1088\u00d7896": "1088\u00d7896",
"1152\u00d7832": "1152\u00d7832",
"1216\u00d7832": "1216\u00d7832",
"1280\u00d7768": "1280\u00d7768",
"1344\u00d7768": "1344\u00d7768",
"1344\u00d7704": "1344\u00d7704",
"1408\u00d7704": "1408\u00d7704",
"1472\u00d7704": "1472\u00d7704",
"1536\u00d7640": "1536\u00d7640",
"1600\u00d7640": "1600\u00d7640",
"1664\u00d7576": "1664\u00d7576",
"1728\u00d7576": "1728\u00d7576",
"Image Number": "Image Number", "Image Number": "Image Number",
"Negative Prompt": "Negative Prompt", "Negative Prompt": "Negative Prompt",
"Describing what you do not want to see.": "Describing what you do not want to see.", "Describing what you do not want to see.": "Describing what you do not want to see.",
@ -385,5 +360,13 @@
"B1": "B1", "B1": "B1",
"B2": "B2", "B2": "B2",
"S1": "S1", "S1": "S1",
"S2": "S2" "S2": "S2",
"Extreme Speed": "Extreme Speed",
"\uD83D\uDD0E Type here to search styles ...": "\uD83D\uDD0E Type here to search styles ...",
"Type prompt here.": "Type prompt here.",
"Outpaint Expansion Direction:": "Outpaint Expansion Direction:",
"* Powered by Fooocus Inpaint Engine (beta)": "* Powered by Fooocus Inpaint Engine (beta)",
"Fooocus Enhance": "Fooocus Enhance",
"Fooocus Cinematic": "Fooocus Cinematic",
"Fooocus Sharp": "Fooocus Sharp"
} }

View File

@ -267,7 +267,8 @@ with open(config_example_path, "w", encoding="utf-8") as json_file:
json_file.write(f'You can modify your "{cpa}" using the below keys, formats, and examples.\n' json_file.write(f'You can modify your "{cpa}" using the below keys, formats, and examples.\n'
f'Do not modify this file. Modifications in this file will not take effect.\n' f'Do not modify this file. Modifications in this file will not take effect.\n'
f'This file is a tutorial and example. Please edit "{cpa}" to really change any settings.\n' f'This file is a tutorial and example. Please edit "{cpa}" to really change any settings.\n'
f'Remember to split the paths with "\\\\" rather than "\\".\n\n\n') + 'Remember to split the paths with "\\\\" rather than "\\", '
'and there is no "," before the last "}". \n\n\n')
json.dump({k: config_dict[k] for k in visited_keys}, json_file, indent=4) json.dump({k: config_dict[k] for k in visited_keys}, json_file, indent=4)

View File

@ -27,7 +27,7 @@ def try_load_sorted_styles(style_names, default_selected):
unselected = [y for y in all_styles if y not in default_selected] unselected = [y for y in all_styles if y not in default_selected]
all_styles = default_selected + unselected all_styles = default_selected + unselected
return all_styles return
def sort_styles(selected): def sort_styles(selected):

View File

@ -1,3 +1,10 @@
# 2.1.810
* Added hints to config_modification_tutorial.txt
* Removed user hacked aspect ratios in I18N english templates, but it will still be read like before.
* fix some style sorting problem again (perhaps should try Gradio 4.0 later).
* Refreshed I18N english templates with more keys.
# 2.1.809 # 2.1.809
* fix some sorting problem. * fix some sorting problem.

View File

@ -225,20 +225,24 @@ with shared.gradio_root:
gr.HTML(f'<a href="/file={get_current_html_path()}" target="_blank">\U0001F4DA History Log</a>') gr.HTML(f'<a href="/file={get_current_html_path()}" target="_blank">\U0001F4DA History Log</a>')
with gr.Tab(label='Style'): with gr.Tab(label='Style'):
initial_style_sorting = style_sorter.try_load_sorted_styles( style_sorter.try_load_sorted_styles(
style_names=legal_style_names, default_selected=modules.config.default_styles) style_names=legal_style_names,
default_selected=modules.config.default_styles)
style_search_bar = gr.Textbox(show_label=False, container=False, style_search_bar = gr.Textbox(show_label=False, container=False,
placeholder="\U0001F50E Type here to search styles ...", placeholder="\U0001F50E Type here to search styles ...",
value="", value="",
label='Search Styles') label='Search Styles')
style_selections = gr.CheckboxGroup(show_label=False, container=False, style_selections = gr.CheckboxGroup(show_label=False, container=False,
choices=initial_style_sorting, choices=copy.deepcopy(style_sorter.all_styles),
value=copy.deepcopy(modules.config.default_styles), value=copy.deepcopy(modules.config.default_styles),
label='Selected Styles', label='Selected Styles',
elem_classes=['style_selections']) elem_classes=['style_selections'])
gradio_receiver_style_selections = gr.Textbox(elem_id='gradio_receiver_style_selections', visible=False) gradio_receiver_style_selections = gr.Textbox(elem_id='gradio_receiver_style_selections', visible=False)
shared.gradio_root.load(lambda: gr.update(choices=copy.deepcopy(style_sorter.all_styles)),
outputs=style_selections)
style_search_bar.change(style_sorter.search_styles, style_search_bar.change(style_sorter.search_styles,
inputs=[style_selections, style_search_bar], inputs=[style_selections, style_search_bar],
outputs=style_selections, outputs=style_selections,