Skip to content

Commit

Permalink
Add Marc K3nt3L's styles
Browse files Browse the repository at this point in the history
Thanks Marc K3nt3L !
  • Loading branch information
lllyasviel authored Dec 19, 2023
1 parent 7a6b46f commit f308489
Show file tree
Hide file tree
Showing 6 changed files with 328 additions and 8 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.852'
version = '2.1.853'
3 changes: 2 additions & 1 deletion modules/sdxl_styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def normalize_key(k):
'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)
Expand Down
13 changes: 8 additions & 5 deletions modules/style_sorter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ See also [About Forking and Promotion of Forks](https://github.com/lllyasviel/Fo

## Thanks

Special thanks to [twri](https://github.com/twri) and [3Diva](https://github.com/3Diva) for creating additional SDXL styles available in Fooocus. Thanks [daswer123](https://github.com/daswer123) for contributing the Canvas Zoom!
Special thanks to [twri](https://github.com/twri) and [3Diva](https://github.com/3Diva) and [Marc K3nt3L](https://github.com/K3nt3L) for creating additional SDXL styles available in Fooocus. Thanks [daswer123](https://github.com/daswer123) for contributing the Canvas Zoom!

## Update Log

Expand Down
Loading

0 comments on commit f308489

Please sign in to comment.