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

Closed
opened 2026-10-30 21:20:39 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @CCpt5 on GitHub (Jan 25, 2024).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/268

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

Originally created by @CCpt5 on GitHub (Jan 25, 2024). Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/268 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
Author
Owner

@DominikDoom commented on GitHub (Jan 26, 2024):

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.

<!-- gh-comment-id:1912264833 --> @DominikDoom commented on GitHub (Jan 26, 2024): 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.
Author
Owner

@CCpt5 commented on GitHub (Jan 26, 2024):

Thanks so much for the implementation and explanation!

<!-- gh-comment-id:1912403600 --> @CCpt5 commented on GitHub (Jan 26, 2024): Thanks so much for the implementation and explanation!
Author
Owner

@CCpt5 commented on GitHub (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.

<!-- gh-comment-id:1912473457 --> @CCpt5 commented on GitHub (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.
Author
Owner

@DominikDoom commented on GitHub (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?

<!-- gh-comment-id:1912503004 --> @DominikDoom commented on GitHub (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](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/assets/34448969/d5ecad1c-19d9-4874-8e89-e9dd8f063ee5) ~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 in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DominikDoom/a1111-sd-webui-tagcomplete#186
No description provided.