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

[Feature Request] - Allow for names of Styles (found on the right side pulldown) to be included for autocomplete. #268

Closed
CCpt5 opened this issue Jan 25, 2024 · 4 comments

Comments

@CCpt5
Copy link

CCpt5 commented Jan 25, 2024

Hi! Love your extension, I've been using it since the very beginning and it's one I really consider essential for me to have a good experience w/ A1111.

I'm wondering if an option to add the names of styles (found on the right pulldown) to the list of items that can be autocompleted could possibly be added? There's a relatively new extension for A1111 that allow you to use Styles as variables in prompts by putting a $ in front of the name. Many of us have 100s of Styles in the style list and recalling their names by memory is often difficult.

I think it'd be fantastic if an option (settings toggle?) to include names of styles in the autocorrect list could be added. I use tagcomplete often to pull up wildcard files of which I have hundreds of - I'd forsee this enhancement as being similar to that but just with Style names.

Thanks for any insight/Consideration!

Styles as Variables extension for A1111: https://github.com/SirVeggie/extension-style-vars

@CCpt5 CCpt5 changed the title [Feature Request] - Allow for Styles (found on the right side pulldown) to be included for autocomplete. [Feature Request] - Allow for names of Styles (found on the right side pulldown) to be included for autocomplete. Jan 25, 2024
@DominikDoom
Copy link
Owner

Took me a bit longer than expected, but I added a new option called "Search for webui style names" for it. Since it currently needs the style-vars extension to really make sense, it's off by default, but should work out of the box after enabling. Maybe I will someday try to load the content of the style directly similar to wildcard files, but for now this should be good enough together with style-vars.

Most basic stuff from the style-vars extension should work. It auto-includes the parentheses if the name contains spaces and will also respect the index markers like $1(...) for the multi-part usage. It also checks for style changes, so no need to reload after adding/removing one.

Let me know if you encounter any issues with this.

@CCpt5
Copy link
Author

CCpt5 commented Jan 26, 2024

Thanks so much for the implementation and explanation!

@CCpt5
Copy link
Author

CCpt5 commented Jan 26, 2024

It auto-includes the parentheses if the name contains spaces

Testing it now and works great!

I do notice that if I pick a style that has spaces, parenthesis are applied, but then the name of the style itself is added/left in the prompt along with its prompt terms. I'm not sure if this is 1) Expected functionality or 2) Perhaps an issue on the "Styles as Variables" side?

IMHO it'd be best that if in all cases the name of the style is replaced w/ the prompt terms.

@DominikDoom
Copy link
Owner

DominikDoom commented Jan 26, 2024

I do notice that if I pick a style that has spaces, parenthesis are applied, but then the name of the style itself is added/left in the prompt along with its prompt terms. I'm not sure if this is 1) Expected functionality or 2) Perhaps an issue on the "Styles as Variables" side?

Not sure if this is your issue, but try unchecking this style-vars option:
image
That tries to replace the style content with the name variable when loading the infotext.
I think the prompt shown below after generating the image can also be affected by this sometimes. The actual infotext saved in the image metadata would be correct either way though.

Edit: More likely than the option, watch out if you have the grid overview selected in case of batch generations. The grid will often show the unprocessed prompt, while the separate images have the replaced text. Also happens with dynamic wildcards, which I keep forgetting sometimes.

Never saw a name that didn't get replaced at all though if that is your issue, in that case it would likely be a problem on style-vars side with how they find & replace the correct sections. Does it happen with all names with spaces in your case?

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

No branches or pull requests

2 participants