Skip to content

Comments

Add additional WD Tagger generation options#312

Closed
maedtb wants to merge 2 commits intojhc13:mainfrom
maedtb:add-character-tag-probability
Closed

Add additional WD Tagger generation options#312
maedtb wants to merge 2 commits intojhc13:mainfrom
maedtb:add-character-tag-probability

Conversation

@maedtb
Copy link
Contributor

@maedtb maedtb commented Dec 12, 2024

New

Added support for a minimum character-tag probability. If a character tag's probability is less than this value, it will be discarded. Set to 1.01 to disable character tags. Set to 0.01 to accept any matched character tags. Note: the existing 'Minimum tag probability' must also be met for a tag to be included in results.

Added additional generated-tag sorting option. Generated tags may now be sorted by:

  • Highest probability -- The existing behavior.
  • Alphabetical -- the (lowercased) alphabetical order of the tag names.
  • Unsorted (Model Default) -- tags are left in the order the model generated them. The order of this is model-dependant.

Changes to existing behavior

Tag categories indexes (general, character, rating) are now stored as sets instead of lists for faster lookup performance. This change slightly increases the RAM footprint, but does not affect VRAM.

Instead of rating-category tags being removed from the tag list for each generation, rating-category tags are no longer added to the overall tag list.

Bug fix

Tag probability is now rounded to 2 decimal points when determining if a tag passes the minimum probability values. This fixes an issue where a tag's displayed probability could be 0.01 lower than the minimum probability.

Added support for a minimum character-tag probability. If a character tag's probability is less than this value, it will be discarded. Set to `1.01` to disable character tags. Set to `0.01` to accept any matched character tags. Note: the existing 'Minimum tag probability' must _also_ be met for a tag to be included in results.

Added additional generated-tag sorting option. Generated tags may now be sorted by:
- `Highest probability` -- The existing behavior.
- `Alphabetical` -- the (lowercased) alphabetical order of the tag names.
- `Unsorted (Model Default)` -- tags are left in the order the model generated them. The order of this is model-dependant.

Tag categories indexes (general, character, rating) are now stored as sets instead of lists for faster lookup performance. This change slightly increases the RAM footprint, but does not affect VRAM.

Instead of rating-category tags being removed from the tag list for each generation, rating-category tags are no longer added to the overall tag list.

Tag probability is now rounded to `2` decimal points when determining if a tag passes the minimum probability values. This fixes an issue where a tag's displayed probability could be `0.01` lower than the minimum probability.
@maedtb
Copy link
Contributor Author

maedtb commented Dec 12, 2024

I think it would be reasonable to move the new sort feature to the Settings dialog as well. I'm not sure how often users would actually swap to different values?

@Seedmanc
Copy link

Would be great to have an automatic redundancy removal for tags such as "long hair, black hair => long black hair", or at least "blouse, white blouse => white blouse".

@maedtb maedtb closed this by deleting the head repository Jan 22, 2026
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

Successfully merging this pull request may close these issues.

2 participants