mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
feat: revert disabling persistent style sorting, code cleanup
This commit is contained in:
@@ -9,7 +9,6 @@ from PIL import Image
|
|||||||
import fooocus_version
|
import fooocus_version
|
||||||
import modules.config
|
import modules.config
|
||||||
import modules.sdxl_styles
|
import modules.sdxl_styles
|
||||||
from modules import hash_cache
|
|
||||||
from modules.flags import MetadataScheme, Performance, Steps
|
from modules.flags import MetadataScheme, Performance, Steps
|
||||||
from modules.flags import SAMPLERS, CIVITAI_NO_KARRAS
|
from modules.flags import SAMPLERS, CIVITAI_NO_KARRAS
|
||||||
from modules.hash_cache import sha256_from_cache
|
from modules.hash_cache import sha256_from_cache
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ def sort_styles(selected):
|
|||||||
global all_styles
|
global all_styles
|
||||||
unselected = [y for y in all_styles if y not in selected]
|
unselected = [y for y in all_styles if y not in selected]
|
||||||
sorted_styles = selected + unselected
|
sorted_styles = selected + unselected
|
||||||
"""
|
|
||||||
try:
|
try:
|
||||||
with open('sorted_styles.json', 'wt', encoding='utf-8') as fp:
|
with open('sorted_styles.json', 'wt', encoding='utf-8') as fp:
|
||||||
json.dump(sorted_styles, fp, indent=4)
|
json.dump(sorted_styles, fp, indent=4)
|
||||||
@@ -45,7 +44,6 @@ def sort_styles(selected):
|
|||||||
print('Write style sorting failed.')
|
print('Write style sorting failed.')
|
||||||
print(e)
|
print(e)
|
||||||
all_styles = sorted_styles
|
all_styles = sorted_styles
|
||||||
"""
|
|
||||||
return gr.CheckboxGroup.update(choices=sorted_styles)
|
return gr.CheckboxGroup.update(choices=sorted_styles)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user