StableSwarmUI
StableSwarmUI copied to clipboard
[FEATURE REQUEST] Add Wildcard as an option in the grid generator.
I would like to be able to add wildcards as one or multiple axis in the grid generator. When a wildcard is set as an axis, you chose a wildcard file and each entries would be used once on the axis. It would need either a replace token in the original prompt or the wildcard name should be already used in the prompt.
i.e.: Axes X is a wildcard containing hairs colors (Brown, Blond, Black) Y is a wildcard containing hair styles (Long Straight, Ponytail, Bun)
Prompt is: "a man with wildcard:hair_colors wildcard:hair_styles hairs"
Y\X | brown | blond | black |
---|---|---|---|
long straight | a man with brown long straight hairs | a man with blond long straight hairs | a man with black long straight hairs |
ponytail | a man with brown ponytail hairs | a man with blond ponytail hairs | a man with black ponytail hairs |
bun | a man with brown bun hairs | a man with blond bun hairs | a man with black bun hairs |
I am checking for a grid extension but it could also be an option for regular gen to just dump all the combinations into the queue.
I can take a crack at it but I haven't fully understood the codebase just yet to help making this so I'm leaving this here in the meantime.
ftr you can do the core concept here via the Prompt Replace
grid axis, the only part missing is automatic loading from a saved wildcard
I've found pretty much all I'm looking for in the GridGeneratorExtension.cs
from line 35 to 101. All I need is to come up with the unpacking logic of the wildcard files and check how to handle if the first or only item in the prompt/replace is the wildcard token because we don't want any gen using the actual token, but only the content. Also I need to consider if someone would want not to unpack the wildcard token.