Repository navigation
SwarmUI Wildcards - conditional on base model #1579
FilkerZero
started this conversation in
Ideas
Replies: 1 comment 1 reply
|
It appears that there already is such a construct: |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Motivation:
I built up a lot of wildcards for SwarmUI for consistent characters and scenes. Some of these have LORAs, so I have different wildcard files for the different models with a suffix (eg, "-XL", "-PNY", "-ILL", "NAI"). with non-suffixed wildcards having no LORAs or embeddings. As I add base models to my collection, however, it becomes more and more of a chore to keep up with the changes. Also, the prompt styles for some models are different than others.
Idea:
Add a control structure to SwarmUI's wildcard syntax that acts like a "switch" statement:
the base model for the generation matches an element in a list provided as part of the prompt. For example:
where
conditionis the name of a conditional evaluation. As a start, I suggest a condition of the form:where
list-of-model-namesis a comma separated list of base model names or known abbreviations, for example: 'sdxl, pony, illustrious, noobaiorxl,pxl,il,nai`.An example of how this looks is:
A lot of other conditionals are possible, and the implementation need not ensure that all of the conditionals used are the same one, all that's important is that the prompt text from the first one that evaluates to true is included, and all of the other conditions to the end of the
selectare skipped.defaultalways evaluates to true, and if it's left out and there are no other matches, the entire<select: ...>evaluates to nothing (does not contribute to the prompt).Afterthought: The
<condition[...]:..>can also appear outside of the<select:...>context, allowing for conditional prompts that include the prompt text if the condition is true and not if the condition is false but having no effect on anything following it.All reactions