From 97a6e87d180ec00a41a27af88184dbea84b48e93 Mon Sep 17 00:00:00 2001 From: lllyasviel Date: Tue, 14 Nov 2023 23:36:58 -0800 Subject: [PATCH] fix some sorting problem --- fooocus_version.py | 2 +- modules/style_sorter.py | 2 ++ update_log.md | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/fooocus_version.py b/fooocus_version.py index abf5c09..96bf211 100644 --- a/fooocus_version.py +++ b/fooocus_version.py @@ -1 +1 @@ -version = '2.1.808' +version = '2.1.809' diff --git a/modules/style_sorter.py b/modules/style_sorter.py index 21742bd..bf04908 100644 --- a/modules/style_sorter.py +++ b/modules/style_sorter.py @@ -31,6 +31,7 @@ def try_load_sorted_styles(style_names, default_selected): def sort_styles(selected): + global all_styles unselected = [y for y in all_styles if y not in selected] sorted_styles = selected + unselected try: @@ -39,6 +40,7 @@ def sort_styles(selected): except Exception as e: print('Write style sorting failed.') print(e) + all_styles = sorted_styles return gr.CheckboxGroup.update(choices=sorted_styles) diff --git a/update_log.md b/update_log.md index c32d029..d2b64f9 100644 --- a/update_log.md +++ b/update_log.md @@ -1,3 +1,7 @@ +# 2.1.809 + +* fix some sorting problem. + # 2.1.808 * Aspect ratios now show aspect ratios.