Tags Generator:
TagsGenerator extends an AI art prompt with companion tags drawn from Danbooru tag co-occurrence statistics. It looks for tags that tend to appear with the ideas already in your prompt, while excluding candidates that the data shows rarely appear alongside them. It chooses tags one at a time, so earlier additions can influence later ones and help form a coherent scene. You can steer the kinds of details it adds, control variety and explicitness, and remove unwanted or redundant additions before using the result downstream.
Tags Generator Input Parameters:
text
Required STRING input with no default. This is the prompt you want to extend. Its recognized tags guide every generated choice, and tags you supplied are treated as fixed during filtering. Tags outside the node’s 20,811-tag vocabulary are silently ignored as generation context, so Danbooru spelling matters: for example, the vocabulary uses bar_(place) rather than bar.
n
Required INT; default: 10; minimum: 0; maximum: 100. Sets how many added tags the node aims to return after filtering, rather than merely how many it initially draws. Set it to 0 for an automatically drawn target length; in that mode, generation can also stop when no remaining candidate is sufficiently better than chance. The requested count is not guaranteed if suitable tags run out or too many additions are removed.
auto
Required BOOLEAN; default: true. When enabled, every category switched on below can contribute without a share limit, and the *_share values are ignored. Switch it off when you want the category shares to shape the mix; their values remain available while auto is on.
subject
Required BOOLEAN; default: true. Allows subject tags, including tags that identify who or how many subjects are present, such as 1girl or solo. Turning it off excludes this category and redistributes its share among enabled categories when shares are active.
subject_share
Required FLOAT; default: 0.1; minimum: -1.0; maximum: 1.0; step: 0.05. With auto off and subject on, sets the subject category’s share relative to other enabled categories, not a direct fraction of n. A value of -1 allows this category without giving it a share of its own; 0 switches it off for allocation. The share is ignored while auto is on.
pose
Required BOOLEAN; default: true. Allows pose-related tags, including the category groups for sexual acts. This switch does not override rating: a general rating still restricts what can appear. Turning it off excludes this category and redistributes its share when shares are active.
pose_share
Required FLOAT; default: 0.3; minimum: -1.0; maximum: 1.0; step: 0.05. With auto off and pose on, sets pose’s relative share of added tags. It is compared with the other enabled shares, so the values do not need to add up to 1. A value of -1 permits pose without its own share; 0 switches it off for allocation.
expressions
Required BOOLEAN; default: true. Allows expression-related tags that describe a subject’s visible expression. Turn it off when you want the node to focus on other kinds of detail; its share passes to remaining enabled categories when shares are active.
expressions_share
Required FLOAT; default: 0.2; minimum: -1.0; maximum: 1.0; step: 0.05. With auto off and expressions on, controls expressions’ share relative to the other enabled categories. Use -1 to leave the category allowed without a share of its own, or 0 to switch it off for allocation.
body
Required BOOLEAN; default: true. Allows body-related tags, including hair and eye details. Turn it off if those details are not useful for the prompt; its share is redistributed when shares are active.
body_share
Required FLOAT; default: 0.1; minimum: -1.0; maximum: 1.0; step: 0.05. With auto off and body on, controls the combined share for body-related details, including hair and eyes. The value is relative to other enabled shares; -1 allows the category without its own share, and 0 switches it off for allocation.
clothes
Required BOOLEAN; default: true. Allows clothing-related tags and job tags, such as office lady and nurse. Turning it off excludes those categories as well, and redistributes its share when shares are active.
clothes_share
Required FLOAT; default: 0.2; minimum: -1.0; maximum: 1.0; step: 0.05. With auto off and clothes on, controls clothing’s relative share of additions. Use -1 to permit the category without its own share, or 0 to switch it off for allocation.
background
Required BOOLEAN; default: true. Allows place or setting tags. This category covers the place itself; objects, lighting, and effects are covered by bg_details. Turning it off redistributes its share when shares are active.
background_share
Required FLOAT; default: 0.1; minimum: -1.0; maximum: 1.0; step: 0.05. With auto off and background on, controls the relative share for place or setting tags. A value of -1 allows the category without its own share; 0 switches it off for allocation.
bg_details
Required BOOLEAN; default: true. Allows background-detail tags, including objects, lighting, and effects. Turn it off when you want fewer surrounding details; its share moves to remaining enabled categories when shares are active.
bg_details_share
Required FLOAT; default: 0.1; minimum: -1.0; maximum: 1.0; step: 0.05. With auto off and bg_details on, sets one combined relative share for objects, lighting, and effects. Use -1 to allow these details without their own share, or 0 to switch them off for allocation.
framing
Required BOOLEAN; default: true. Allows framing-related tags that describe how an image is composed. Turning it off excludes this category and redistributes its share when shares are active.
framing_share
Required FLOAT; default: 0.05; minimum: -1.0; maximum: 1.0; step: 0.05. With auto off and framing on, controls framing’s relative share of the additions. A value of -1 permits it without its own share; 0 switches it off for allocation.
lift_threshold
Required FLOAT; default: 0.5; minimum: 0.0; maximum: 1.0; step: 0.01. Controls how strongly the node rejects a candidate that rarely appears alongside a reference tag compared with chance. Raising it makes the veto stricter and can reduce contradictions, but may leave fewer eligible additions. Lowering it can help when generation returns too few tags.
momentum
Required FLOAT; default: 0.2; minimum: 0.0; maximum: 1.0; step: 0.05. Controls how much an added tag influences later picks. At 0, each pick answers to your original prompt alone; at 1, an added tag influences later choices as much as a prompt tag. Higher values can make additions read more like one scene, but can also pull the result away from your original idea.
repetition_penalty
Required FLOAT; default: 2.0; minimum: 1.0; maximum: 10.0; step: 0.1. Reduces the odds of adding multiple tags that vary along the same wording pattern, such as different skin colors or similar hands on poses. At 2.0, each existing tag on that axis divides a candidate’s odds by two; at 1.0, this penalty is off. Exact repeats are blocked separately, so this setting is for near-repetition, not duplicate removal.
rating
Required choice; default: all; options: general, sensitive, questionable, explicit, all, random. A named rating sets an explicitness ceiling: the node uses co-occurrence statistics from the corresponding cumulative rating tier and masks tags rated above the request. The source also describes a nudge toward the named rating, so a ceiling does not necessarily mean the output will stay as mild as possible within it. all applies no rating ceiling or preference and leaves the prompt to guide the result. random selects one of the four named ratings from the seed, with each equally likely.
temperature
Required FLOAT; default: 1.3; minimum: 0.0; maximum: 5.0; step: 0.05. Controls sampling variety. At 0, the node always takes the highest-scoring available candidate, making sampling deterministic and the seed irrelevant to those picks. Higher values give weaker candidates more opportunity to be chosen, which can increase variety at the cost of predictability.
top_k
Required INT; default: 0; minimum: 0; maximum: 500. Limits each sampling step to this many highest-ranked candidates. A value of 0 imposes no such limit. It is ignored when temperature is 0. The node interface’s default is 0, even though the execute method shown in the source has a different fallback value.
top_p
Required FLOAT; default: 1.0; minimum: 0.0; maximum: 1.0; step: 0.01. Keeps the best candidates whose probabilities make up the selected portion of the sampling distribution. At 1.0, it imposes no limit; at 0, exactly one candidate remains, effectively making that sampling choice greedy.
min_p
Required FLOAT; default: 0.0; minimum: 0.0; maximum: 1.0; step: 0.01. Removes candidates whose probability falls below this fraction of the best candidate’s probability. At 0, this filter is off. Raising it narrows choices toward stronger candidates.
min_count
Required INT; default: 100; minimum: 100; maximum: 1000000; step: 100. Excludes candidate tags with fewer than this many posts in the requested rating tier. The default matches the vocabulary floor and adds no further rarity filtering. Raise it if additions repeatedly include tags too obscure for your image model to have learned, while remembering that a smaller rating tier may have fewer eligible candidates.
replace_underscores
Optional BOOLEAN; default: true. Changes generated tag spelling for the finished prompt, such as blue_eyes to blue eyes. Turn it off when you need the underscore form for a later step.
filter_tags
Optional BOOLEAN; default: true. Runs duplicate and blacklist filtering on the finished prompt. Your original tags are treated as fixed; generated additions are the ones at risk of removal. If filtering removes an addition, the node attempts to draw replacements to reach n.
filter_subtags
Optional BOOLEAN; default: true. Removes a generated tag when another tag already implies it, such as retaining white dog rather than also adding dog. This can make the result more concise, although it may remove a freshly chosen tag and require a replacement draw.
filter_copyright
Optional BOOLEAN; default: true. Excludes candidate tags strongly associated with one character or franchise, reducing the chance that a general setting drifts toward a specific copyrighted character or work. Tags you put in the original prompt are not removed by this candidate filter.
order_tags
Optional BOOLEAN; default: true. Groups added tags by kind in the returned text, giving similar categories a more consistent position. Turn it off to keep the order in which additions were drawn. Your original prompt tags are not reordered.
blacklist
Optional STRING; default: an empty string. A case-insensitive regular expression used to exclude matching candidate tags, checked against their spaced spelling. For example, hair|eyes excludes candidates containing either word, while ^black targets candidates beginning with black . It also feeds the finishing filter when that filter runs. Use | for alternatives; an invalid pattern is logged and ignored.
seed
Optional INT; default: 0; minimum: 0; maximum: 18446744073709551615. Controls reproducible sampling: the same seed and settings produce the same choices, and changing it can produce another variation. It also determines the cap chosen by rating set to random. At temperature 0, the seed does not affect the deterministic candidate picks.
Tags Generator Output Parameters:
text
First output, STRING. Contains the finished prompt: your original tags first, followed by the surviving generated additions. Use it when you want to send the complete extended prompt to another node. The node aims for n surviving additions, but may return fewer if it cannot find enough suitable tags. If its suggestion artifact is unavailable, this output is the processed input prompt without generated additions.
generated_text
Second output, STRING. Contains only the added tags that survived processing, joined as a prompt-ready string. Use it when you want to place, weight, or inspect new tags separately from your original prompt. It is empty when no additions survive or the suggestion artifact is unavailable.
Tags Generator Usage Tips:
- Start with
nand the category switches. Leaveautoon when you want every enabled category available; turn it off to use the*_sharesettings for a more deliberate balance. - With
autooff, treat shares as relative weights, not percentages. For example, enabling onlyposeat 0.2 andexpressionsat 0.1 gives pose roughly twice the allocation of expressions. - Use recognized Danbooru spellings in
textwhen a concept is important. An unrecognized spelling can remain in your input while contributing nothing to candidate selection. - For repeatable comparisons, keep the seed fixed while changing one setting at a time. Set
temperatureto 0 when you want the highest-scoring choices; use a higher value when you want more variety. - If additions contradict the prompt, try raising
lift_threshold. If too few tags survive, try lowering it, loweringmin_count, or relaxing restrictive categories and blacklist rules. - If results dwell on near-duplicates, raise
repetition_penalty. If later tags wander into a new subject, lowermomentumso your original prompt has more influence. - Raise
min_countwhen obscure tags are not useful for your image model. Choose a namedratingwhen you need an explicitness ceiling;alldoes not impose one. - Use
blacklistfor precise exclusions, such ashair|eyes. Check the pattern carefully: an invalid expression is ignored, and broad patterns can leave too few candidates.
Tags Generator Common Errors and Solutions:
[ Tags Generator] suggest artifact not found; passing through
- Explanation: The required suggestion artifact is unavailable, so the node cannot generate companion tags. It returns the processed input prompt and an empty
generated_textinstead. - Solution: Check that the node’s required suggestion resources are installed and available to the node, then run it again.
[ Tags Generator] only ... of ... tags after ... rounds -- lower lift_threshold or min_count, or relax blacklist and categories
- Explanation: Fewer than the requested
nadditions survived. The node makes a limited number of attempts to compensate for tags removed during filtering, but suitable candidates can run out. - Solution: Lower
lift_thresholdormin_count, relaxblacklist, enable more categories, or request fewer tags. If subtag removal is responsible, reviewfilter_subtags.
Invalid blacklist pattern; pattern ignored
- Explanation: The source states that an unparseable blacklist expression is logged and ignored, but does not provide the exact log-message wording. Your intended exclusions may therefore not take effect.
- Solution: Simplify the expression and check brackets or other special characters. For alternatives, use a pattern such as
hair|eyes.
No new tags appear, but no error is shown
- Explanation: This is a possible outcome rather than a documented error message. Your prompt may contain no recognized tags that attract eligible candidates, or your rating, category, rarity, veto, and blacklist settings may leave nothing suitable.
- Solution: Check important prompt tags against Danbooru spelling, enable relevant categories, and gradually relax
min_count,lift_threshold, orblacklistto identify what limits the result.
