Skip to content

Commit

Permalink
810
Browse files Browse the repository at this point in the history
  • Loading branch information
lllyasviel committed Nov 15, 2023
1 parent 6769ab0 commit 861c8d3
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 32 deletions.
2 changes: 1 addition & 1 deletion fooocus_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '2.1.809'
version = '2.1.810'
35 changes: 9 additions & 26 deletions language/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,7 @@
"Speed": "Speed",
"Quality": "Quality",
"Aspect Ratios": "Aspect Ratios",
"896\u00d71152": "896\u00d71152",
"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",
"Negative Prompt": "Negative Prompt",
"Describing what you do not want to see.": "Describing what you do not want to see.",
Expand Down Expand Up @@ -385,5 +360,13 @@
"B1": "B1",
"B2": "B2",
"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"
}
3 changes: 2 additions & 1 deletion modules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ def add_ratio(x):
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'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)


Expand Down
2 changes: 1 addition & 1 deletion modules/style_sorter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
all_styles = default_selected + unselected

return all_styles
return


def sort_styles(selected):
Expand Down
7 changes: 7 additions & 0 deletions update_log.md
Original file line number Diff line number Diff line change
@@ -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

* fix some sorting problem.
Expand Down
10 changes: 7 additions & 3 deletions webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,20 +225,24 @@ def refresh_seed(r, seed_string):
gr.HTML(f'<a href="/file={get_current_html_path()}" target="_blank">\U0001F4DA History Log</a>')

with gr.Tab(label='Style'):
initial_style_sorting = style_sorter.try_load_sorted_styles(
style_names=legal_style_names, default_selected=modules.config.default_styles)
style_sorter.try_load_sorted_styles(
style_names=legal_style_names,
default_selected=modules.config.default_styles)

style_search_bar = gr.Textbox(show_label=False, container=False,
placeholder="\U0001F50E Type here to search styles ...",
value="",
label='Search Styles')
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),
label='Selected Styles',
elem_classes=['style_selections'])
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,
inputs=[style_selections, style_search_bar],
outputs=style_selections,
Expand Down

0 comments on commit 861c8d3

Please sign in to comment.