Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Request ] Possibility to save custom styles #58

Closed
Jisevind opened this issue Sep 6, 2023 · 12 comments
Closed

[ Request ] Possibility to save custom styles #58

Jisevind opened this issue Sep 6, 2023 · 12 comments
Labels
wontfix This will not be worked on

Comments

@Jisevind
Copy link

Jisevind commented Sep 6, 2023

It would be great if we could save our own custom styles, the positive and negative prompts.
Maybe have it in its own dropdown.

@Jisevind Jisevind changed the title Possibility to save custom styles [ Request ] Possibility to save custom styles Sep 6, 2023
@MoonRide303
Copy link
Owner

@Jisevind I don't plan adding saving custom styles, cause I want to keep UI as simple as possible, and add only absolutely necessary buttons. But I added support for loading custom styles from JSON files in v1.0.45.1 - you can look at original styles in sdxl_styles folder, and make your own styles in in similar fashion (JSON files from this folder will be loaded on start).

@MoonRide303 MoonRide303 added the wontfix This will not be worked on label Sep 6, 2023
@barepixels
Copy link

barepixels commented Sep 6, 2023

Just want to get clear:

In "sdxl_styles" folder there are 4 included styles.json.

You can edit but NOT add new styles.json file
NOR rename the existing json files
because these 4 are hardcoded in modules/sdxl_styles.py
Only make changes within the 4 included json files

Is this correct?

@Jisevind
Copy link
Author

Jisevind commented Sep 6, 2023

@barepixels It seems to load all json files in the styles folder, I was able to create a new json file and add new styles and it shows up in the list.

@MoonRide303
Copy link
Owner

@barepixels You CAN add more files there. Those 4 listed in sdxl_styles.py are just to have those default styles loaded and listed as first.

@barepixels
Copy link

OK very cool. Happy dance

@barepixels
Copy link

barepixels commented Sep 6, 2023

But what if I don't want them to be first. I think I want my custom one first.

@MoonRide303
Copy link
Owner

MoonRide303 commented Sep 6, 2023

@barepixels You can rename those files (including default styles) to something like styles_1.json styles_2.json etc. - they will be loaded in alphabetical order of file names, then.

@barepixels
Copy link

barepixels commented Sep 6, 2023

...

@barepixels
Copy link

barepixels commented Sep 6, 2023

Answer to my own questions:

I made my own style.json "sdxl_styles_1.json" It has just one custom entry
I move the default 4 json files into a sub diretory as backup

Relaunch Fooocus, it did it's update and did not download the missing default 4 json files YAY
and Fooocus style menu only shows 1 entry. YAY

Happy Dance

@barepixels
Copy link

barepixels commented Sep 6, 2023

Actually the current menu gives me 3 choice

  1. None with a check mark, I set it to None in settings.jon
  2. cinematic-default
  3. Favorites Style, which is the only entry in "sdxl_styles_1.json"

style

Where did #2 "cinematic-default" come from?

@MoonRide303
Copy link
Owner

@barepixels cinematic-default is the default built-in style of Fooocus - I wanted to keep this one in the code. All the other that came from external sources (sai / twri / diva and mre) are in JSON files.

@barepixels
Copy link

OK thanks. BTW am loving generate forever

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants