Skip to content

allow wildcard files to have comment lines - #30

Open
rubberbaron wants to merge 1 commit into
AUTOMATIC1111:masterfrom
rubberbaron:master
Open

allow wildcard files to have comment lines#30
rubberbaron wants to merge 1 commit into
AUTOMATIC1111:masterfrom
rubberbaron:master

Conversation

@rubberbaron

Copy link
Copy Markdown

This PR allows very simple comments in Wildcards files: if lines start with "#", they are a comment.

Having comments allows wildcard files shared between people to contain authorship information, sources, and other information.

Beyond wanting this on general principle, I personally want it for compatibility:

I'll be releasing my extended wildcards extension at some point, and it will include a number of built-in public domain wildcard lists. Because my library supports comments, I have information in them like:

# cc0. derived from https://github.com/dariusk/corpora
# validated in SD 1.5 with "a __animal__"
# excluded due to issues: gnu, musk, mustang, mole, newt, puma, silver fox, wolverine
aardvark
alligator
alpaca
antelope
ape
[etc.]

However, I intentionally don't use any other features not found in this Wildcards library other than these comments, so this small change will make those files compatible.

@rubberbaron

rubberbaron commented Aug 7, 2023

Copy link
Copy Markdown
Author

I verified that this is the basic comment format used by Dynamic Prompts as well. (Like my extension, it supports more general comments everywhere, but I think this PR represents a reasonable compromise between making the Wildcards extension more compatible without introducing too much extra complexity.)

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.

1 participant