Add Marc K3nt3L's styles

Thanks Marc K3nt3L !
This commit is contained in:
lllyasviel
2023-12-18 19:01:52 -08:00
committed by GitHub
parent 7a6b46f363
commit f308489440
6 changed files with 328 additions and 8 deletions
+2 -1
View File
@@ -31,7 +31,8 @@ for x in ['sdxl_styles_fooocus.json',
'sdxl_styles_sai.json',
'sdxl_styles_mre.json',
'sdxl_styles_twri.json',
'sdxl_styles_diva.json']:
'sdxl_styles_diva.json',
'sdxl_styles_marc_k3nt3l.json']:
if x in styles_files:
styles_files.remove(x)
styles_files.append(x)
+8 -5
View File
@@ -15,11 +15,14 @@ def try_load_sorted_styles(style_names, default_selected):
try:
if os.path.exists('sorted_styles.json'):
with open('sorted_styles.json', 'rt', encoding='utf-8') as fp:
sorted_styles = json.load(fp)
if len(sorted_styles) == len(all_styles):
if all(x in all_styles for x in sorted_styles):
if all(x in sorted_styles for x in all_styles):
all_styles = sorted_styles
sorted_styles = []
for x in json.load(fp):
if x in all_styles:
sorted_styles.append(x)
for x in all_styles:
if x not in sorted_styles:
sorted_styles.append(x)
all_styles = sorted_styles
except Exception as e:
print('Load style sorting failed.')
print(e)