From 97a8475a623e57c515ceaba51b4b6ef8bef8c004 Mon Sep 17 00:00:00 2001 From: Manuel Schmid Date: Wed, 17 Jul 2024 11:59:01 +0200 Subject: [PATCH] feat: revert disabling persistent style sorting, code cleanup --- modules/meta_parser.py | 1 - modules/style_sorter.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/modules/meta_parser.py b/modules/meta_parser.py index ac0dff38..14f85835 100644 --- a/modules/meta_parser.py +++ b/modules/meta_parser.py @@ -9,7 +9,6 @@ from PIL import Image import fooocus_version import modules.config import modules.sdxl_styles -from modules import hash_cache from modules.flags import MetadataScheme, Performance, Steps from modules.flags import SAMPLERS, CIVITAI_NO_KARRAS from modules.hash_cache import sha256_from_cache diff --git a/modules/style_sorter.py b/modules/style_sorter.py index 5cab89fc..49142bc7 100644 --- a/modules/style_sorter.py +++ b/modules/style_sorter.py @@ -37,7 +37,6 @@ def sort_styles(selected): global all_styles unselected = [y for y in all_styles if y not in selected] sorted_styles = selected + unselected - """ try: with open('sorted_styles.json', 'wt', encoding='utf-8') as fp: json.dump(sorted_styles, fp, indent=4) @@ -45,7 +44,6 @@ def sort_styles(selected): print('Write style sorting failed.') print(e) all_styles = sorted_styles - """ return gr.CheckboxGroup.update(choices=sorted_styles)