comfyui-generator-pack Introduction
comfyui-generator-pack is a collection of ComfyUI nodes for building and organizing Danbooru-style prompts. It can suggest tags that fit what you have already written, turn a sentence into recognized tags, choose character tags, sort a prompt into categories, and adjust the strength of selected categories. It also offers a conflict filter to help remove tag combinations that rarely appear together.
You can use the nodes individually or connect them into a workflow. For example, you might describe a scene in ordinary language, extract its tags, add a character, generate more scene details, then give the background a little more weight. The pack is especially useful when you want to explore prompt ideas without choosing every tag by hand.
The author provides an example image and workflow:
The example connects five nodes in this order: Tags Extractor turns a sentence into tags; Character Tags Generator adds a character; Tags Generator expands the result into a fuller prompt; Classify Tags separates the tags by category; and Weight Tags adjusts the categories you select.
How comfyui-generator-pack Works
Think of a prompt as a collection of scene details: who is pictured, what they are wearing, where they are, and how the image is framed. The pack works with those details as tags.
The nodes have different jobs:
- Recognize: Tags Extractor looks for Danbooru tags that match a sentence you provide.
- Expand: Tags Generator proposes additional tags based on the prompt and your chosen settings.
- Check: Conflict filtering uses statistics about which tags appear together to reject unlikely combinations.
- Organize and adjust: Other nodes classify, group, or weight tags so the prompt is easier to work with.
A suggested tag is still a creative suggestion, not a guarantee that your image model will depict it. The statistical checks can catch some awkward combinations, but you should review the finished prompt against the scene you intend to make.
Most of the pack works offline. Tags Extractor’s translate option is the exception: when enabled, it sends the sentence to Google Translate through googletrans before looking for tags.
comfyui-generator-pack Features
The nodes are found under GeneratorPack/Tags. Each widget has a tooltip; hover over a control in ComfyUI for a short explanation.
Tags Generator: Expand a prompt
Give Tags Generator a prompt and use its text output for the full prompt. If you only want the newly suggested tags, use generated_text.
| Setting | What it changes |
|---|---|
n | The number of tags to add after filtering. With n = 0, the node chooses a length based on its corpus and stops when further suggestions are not better than chance. |
auto | Draws from the enabled categories without applying their _share values. Your share settings remain saved but are ignored while auto is on. |
Category toggles and _share | Choose which kinds of tags may be added and their relative proportions when auto is off. The eight categories are subject, pose, expressions, body, clothes, background, bg_details, and framing. |
Shares are relative, not fixed percentages. If only pose and expressions are enabled with shares of 0.2 and 0.1, a request for 10 tags aims for about seven pose tags and three expression tags. A share of 0 turns that category off; -1 means unlimited. In this pack, body includes hair and eyes, background covers places, and bg_details covers props, lighting, and effects. The pose category also includes sexual-act tags, so review that category alongside your intended rating.
| Setting | When you might adjust it |
|---|---|
rating | Use it when suggested tags do not fit your intended content level. all draws a rating from the seed and can vary between seeds. |
momentum | Raise it when suggestions feel unrelated; lower it when the developing scene feels too driven by its previous choices. |
repetition_penalty | Increase it when suggestions spend too many slots on variations of the same idea, such as several conflicting skin colors. |
lift_threshold | Controls how strongly the node rejects tag pairs that appear together less often than expected. The default, 0.5, rejects pairs that co-occur less than half as often as chance would suggest, including pairs never seen together. |
blacklist | Excludes matching candidates before selection, allowing the node to fill the requested n from other candidates. It accepts regular expressions, such as hair|eyes or ^black . The <color> wildcard expands from resources/wildcards.yaml. |
temperature, top_k, top_p, min_p, seed | Control how suggestions are sampled. For example, temperature = 0 always chooses the highest-ranked available option at each choice. |
filter_copyright | On by default. Excludes candidate tags closely tied to particular characters or works. You can add missed tags to resources/copyright_blacklist.txt. Tags you entered yourself are not changed. |
order_tags | On by default. Sorts added tags by type, from people and body details through expressions, poses, clothing, props, places, and framing. Turn it off to keep the order in which tags were selected. Your input prompt is not reordered. |
Three behaviors work without separate widgets:
- Empty prompts: The node can begin with an anchor such as
beachormoonand build a scene from it. - Non-positive tag weights: A tag such as
(light particles:-1.2)pushes suggestions away from that idea. - Solo prompts: The node blocks tags that require a second person. You can edit the list in
resources/solo_conflict.txtafter it is created on first use.
For prompts involving more than one character, such as those containing 2girls, hug, or yuri, the conflict check uses statistics from all posts rather than only solo posts.
Character Tags Generator: Choose characters
Character Tags Generator draws from Danbooru character tags with at least 100 posts. Eligible characters are selected with equal probability.
| Setting | What it changes |
|---|---|
n | How many characters to choose. |
sex | Which of girl, boy, and other may be chosen; select at least one. The classification is based mainly on the most common 1girl, 1boy, or 1other tag in a character’s solo posts. Ties count as other. Characters strongly associated with no humans, such as Pokémon or mecha, also count as other. |
subject | Adds matching person-count tags. One girl becomes 1girl, solo; one girl and one boy become 1girl, 1boy. |
year_min / year_max | Optional limits on the year of a character’s first post. |
min_count | Requires at least this many posts for a character to be eligible. |
Use min_count when you want to narrow the choices to more frequently posted characters. Use the year limits when exploring characters from a particular period.
Tags Extractor: Turn a sentence into tags
Tags Extractor returns recognized Danbooru tags for the ideas expressed in your sentence. When a phrase is not in its tag vocabulary, it also looks through Danbooru wiki definitions for a match. Its table output shows the spellings considered for each match and the associated post counts, helping you see how it interpreted your words.
| Setting | What it changes |
|---|---|
subject | Counts people mentioned in the sentence and adds person-count tags. For example, “a girl and two boys” becomes 1girl, 2boys. |
translate | Translates the sentence into English with Google Translate before extracting tags. It uses googletrans and makes one request per run. |
min_count | Omits tags with fewer posts than the chosen threshold. |
blacklist | Removes matching tags from the result using a regular expression. |
Tags Conflict Filter: Check an existing prompt
Tags Conflict Filter applies the conflict-rejection logic used by Tags Generator as a separate node. It uses tag co-occurrence statistics, rather than only a hand-written list, to remove tags that conflict with fixed tags. Use it when your tags come from another source but you still want the same check.
Classify Tags: Sort by subject
Classify Tags divides a prompt into the same eight categories used by Tags Generator. Danbooru character tags go into character; tags that do not belong to a selected category go into others. This makes it easier to inspect a prompt or send particular categories to Weight Tags.
Group Tags: Make a prompt easier to scan
Group Tags places related tags together, with one group per line. It groups tags that share their first or last word and puts person tags first. Its cap setting limits the size of each group; when trimming a group, it removes color tags first.
Weight Tags: Emphasize selected categories
Weight Tags can wrap tags in ComfyUI-style weights, such as (library:1.2). It offers a toggle and weight for each of Classify Tags’ outputs: the eight generator categories, character, and others. Categories you leave off pass through unchanged.
For example, with expressions set to 1.5 and background set to 1.2, the tags :3, shirt, library become (:3:1.5), shirt, (library:1.2). The shirt stays unchanged because its category was not enabled.
If a tag already has a weight, mode determines what happens next: replace substitutes the new weight while keeping the original sign, and multiply combines the existing and new weights.
comfyui-generator-pack Data and Privacy
The repository does not include its data tables, labels, or lists. A node downloads the files it needs into resources/ when it first needs them, with files pinned by SHA-256 hashes. Smaller files come in one archive; statistics tables of up to 100 MB are downloaded separately. A workflow that only groups tags therefore does not need to fetch the generator’s sampling data.
Files already present are not downloaded again. This preserves your edits to solo_conflict.txt, copyright_blacklist.txt, and wildcards.yaml.
The author built the character list from danbooru-2026-clean-metadata, containing posts through September 2025. Apart from the optional translate setting, the pack’s operations run offline; enabling translation sends your sentence to Google Translate.
Troubleshooting comfyui-generator-pack
The suggested tags do not seem to belong in the same scene.
- Raise
momentumin Tags Generator and try again. - Check which categories are enabled and turn off any you do not need.
- If a particular type of suggestion is consistently unwanted, exclude it with
blacklist.
The prompt keeps adding variations of one detail.
- Increase
repetition_penalty. - Review the generated tags for competing descriptions, such as multiple skin colors.
- Keep your preferred detail in the input prompt and use a blacklist for alternatives you do not want suggested.
Tags clash with an existing character or scene.
- Increase
lift_thresholdto reject more pairs that rarely appear together. - Check that your prompt includes appropriate person-count tags, particularly for a multi-character scene.
- If your tags came from elsewhere, pass them through Tags Conflict Filter.
The content level is not what you intended.
- Set
ratingto the level you want instead ofall. - Review whether
poseis enabled, because that category also covers sexual-act tags. - Check the final prompt before generating an image.
I only need the new suggestions. Which output should I use?
Use generated_text from Tags Generator. Its text output contains the full prompt.
Will the pack rewrite tags I entered myself?
Tags Generator’s copyright filter does not remove tags you entered. Its ordering option sorts added tags without reordering your input prompt.
Why are files downloaded during first use?
The repository does not ship its data. Each node fetches what it needs when it needs it, so a simple grouping workflow does not fetch the larger sampling tables.
Does my prompt leave my computer?
The pack works offline except when you enable Tags Extractor’s translate option. That option sends the sentence to Google Translate.
Learn More about comfyui-generator-pack
- English README and Korean README: the author’s documentation in either language.
- Example workflow image: see how the five-node example is connected.
- Example output image: see an image associated with that workflow.
- In-node tooltips: hover over a widget while its node is open for guidance on that setting.
- License: the extension is provided under GPL-3.0.
