[GH-ISSUE #324] Strange behavior with no autocomplete results when 1 letter tokens with weight are added to prompt #223

Closed
opened 2026-10-30 21:21:15 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @saigoncan on GitHub (Apr 15, 2025).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/324

Originally assigned to: @DominikDoom on GitHub.

If I have any letter enclosed in parentheses with a specified weight, typing that letter elsewhere in the prompt yields no results for autocomplete. For instance, if I have (v:0.5) in my prompt, all of a sudden, the listings for v (i.e. very long hair, violet hair, virtual youtuber) disappears from any autocomplete search results. For reference, I am using Panchovix's reForge fork on the latest commit.

Originally created by @saigoncan on GitHub (Apr 15, 2025). Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/324 Originally assigned to: @DominikDoom on GitHub. If I have any letter enclosed in parentheses with a specified weight, typing that letter elsewhere in the prompt yields no results for autocomplete. For instance, if I have (v:0.5) in my prompt, all of a sudden, the listings for v (i.e. very long hair, violet hair, virtual youtuber) disappears from any autocomplete search results. For reference, I am using Panchovix's reForge fork on the latest commit.
bsakaguchi 2026-10-30 21:21:15 +00:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@DominikDoom commented on GitHub (Apr 15, 2025):

That is very likely a regex issue, I parse weighted and regular tags separately to prevent the weight control part of the tags like brackets, colon and weight numbers to interfere with the suggestions.

There's probably a bug somewhere that fails to separate these if only one letter is inside, I'll have a look at it when I get the chance

<!-- gh-comment-id:2806992115 --> @DominikDoom commented on GitHub (Apr 15, 2025): That is very likely a regex issue, I parse weighted and regular tags separately to prevent the weight control part of the tags like brackets, colon and weight numbers to interfere with the suggestions. There's probably a bug somewhere that fails to separate these if only one letter is inside, I'll have a look at it when I get the chance
Author
Owner

@DominikDoom commented on GitHub (Apr 15, 2025):

It actually happened with longer tags in weight parentheses too, just not as likely since they get unique faster.
The actual cause was weighted tags filtering out their counterpart in the regular tag matches (done to avoid duplication), but they filtered out every exact match instead of just one each. So for one- or few-letter weighted tags, it prevented the new tag being detected as a change.

Hopefully the fix works without breaking anything else, since the prompt parsing is pretty complex 😅

<!-- gh-comment-id:2807370608 --> @DominikDoom commented on GitHub (Apr 15, 2025): It actually happened with longer tags in weight parentheses too, just not as likely since they get unique faster. The actual cause was weighted tags filtering out their counterpart in the regular tag matches (done to avoid duplication), but they filtered out every exact match instead of just one each. So for one- or few-letter weighted tags, it prevented the new tag being detected as a change. Hopefully the fix works without breaking anything else, since the prompt parsing is pretty complex 😅
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#223
No description provided.