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

Add support for multiple separate style*.csv files #14081

Closed
wants to merge 45 commits into from

Conversation

MisterSeajay
Copy link
Contributor

@MisterSeajay MisterSeajay commented Nov 24, 2023

Description

  • Add support for multiple style files, using a wildcard in the CSV file name, e.g. style*.csv; this allows users to split styles between different CSV files (e.g. photographic, illustrative, etc.) and use downloaded CSV files (e.g. the Fooocus style list) without needing to merge them into one single file.
  • All code changes are within the styles.py file; no changes required elsewhere within the application to support this. Interfaces to exposed functions/methods have not been broken.
  • Feature request: [Feature Request]: Allow use of multiple CSV files for Styles #14122

Usage

To enable the multiple CSV functionality it is sufficient to add or amend the --styles-file command-line argument to include a wildcard * in the CSV file name, e.g. --styles-file=\path\to\styles*.csv. This will load all files matching the wildcarded file name.

The styles drop-down groups styles according to the file they were loaded from and inserts markers within the list to indicate which file the subsequent styles have been loaded from.

Edited styles are pushed to the bottom of the list of styles (no change to existing behavior). When an existing style is edited and saved, it will be saved to the same file that it was loaded from. New styles are always added back to the default styles.csv.

If the command line argument is omitted, or points to exactly one file, then the default behavior of using just that one file is maintained.

Checklist:

Charlie Joynt added 30 commits July 14, 2023 22:19
@AUTOMATIC1111
Copy link
Owner

I am usually inclined to not want to add changes to the code unless there is demand for them... Can some users comment on desirability of this feature?

@w-e-w
Copy link
Collaborator

w-e-w commented Nov 26, 2023

All code changes are within the styles.py file

well .... I can see that you have made changes too .gitignore
in the future put your local .gitignore in ".git\info\exclude"

no comment on whether or not this should be merged
but if this is going to be merged it should be Squashed

@MisterSeajay
Copy link
Contributor Author

The feature request for this is my own. I hadn't created the Issue before, but I have now:

#14122

@w-e-w
Copy link
Collaborator

w-e-w commented Nov 27, 2023

@cjj1977 please squash your commits

@MisterSeajay
Copy link
Contributor Author

I can see that you have made changes too .gitignore in the future put your local .gitignore in ".git\info\exclude"

Apologies for my ignorance/bad etiquette! I have moved my customizations to ".git\info\exclude".

@MisterSeajay
Copy link
Contributor Author

I didn't squash commits. Revoking this PR & will raise a replacement one, hopefully cleaner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants