日本語はこちらへ
An extension for Stable Diffusion Web UI that upsamples prompts by generating or completing danbooru tags using lightweight LLM.
It's useful for people who don't want think about long prompt or want to see diverse, natural and high quality images without any thinking.
Open the Danbooru Tags Upsampler
accordion and check the Enabled
checkbox to enable this extension.
Explanation of parameters:
Parameter name | Description | Example value |
---|---|---|
Total tag length | This parameter can specify the amount of total tags after completing the positive prompt. Not the amount of completing tags. very short means "less than 10 tags", short means "less than 20 tags", long means "less than 40 tags" and very long is more than that. |
long is recommended |
Ban tags | All tags in this field will never appear in completion tags. It's useful when you don't want to contain some specific tags. Using * maches to any character. (e.g. * background matches to simple background , white background , ...) |
official alternate costume, english text, * background, ... |
Seed for upsampling tags | If this number and the positive prompt are fixed, the completion tags are also fixed. -1 means "generates tags using random seed every time" |
If you want to generate images with different final prompts every time, set to -1 . |
Upsampling timing | When to upsample, before or after other prompt processing (e.g. sd-dynamic-prompts or webui's styles feature) are applied. | After applying other prompt processings |
Variety level | These parameters are presets of the Generation config . This can change the variety of upsampled tags. |
varied |
Generation config | LLM parameters of generating tags. It's recommended not to touch if you are not familiar with language model's generation parameters, and use Variety level option instead. |
Input prompt | Without upsampling | With upsampling |
1girl, solo, cowboy shot (seed: 2396487241) | ||
(prompts used to generate) | 1girl, solo, cowboy shot | 1girl, solo, cowboy shot, ahoge, animal ears, bare shoulders, blue hair, blush, closed mouth, collarbone, collared shirt, dress, eyelashes, fox ears, fox girl, fox tail, hair between eyes, heart, long hair, long sleeves, looking at viewer, neck ribbon, ribbon, shirt, simple background, sleeves past wrists, smile, tail, white background, white dress, white shirt, yellow eyes |
3girls (seed: 684589178) | ||
(prompts used to generate) | 3girls | 3girls, black footwear, black hair, black thighhighs, boots, bow, bowtie, chibi, closed mouth, collared shirt, flower, grey hair, hair between eyes, hair flower, hair ornament, long hair, long sleeves, looking at viewer, multiple girls, purple eyes, red eyes, shirt, short hair, sitting, smile, thighhighs, vest, white shirt, white skirt |
no humans, scenery (seed: 3702717413) | ||
(prompts used to generate) | no humans, scenery | no humans, scenery, animal, animal focus, bird, blue eyes, cat, dog, flower, grass, leaf, nature, petals, shadow, sitting, star (sky), sunflower, tree |
1girl, frieren, sousou no frieren (seed: 787304393) | ||
(prompts used to generate) | 1girl, frieren, sousou no frieren | 1girl, frieren, sousou no frieren, black pantyhose, cape, closed mouth, elf, fingernails, green eyes, grey hair, hair between eyes, long hair, long sleeves, looking at viewer, pantyhose, pointy ears, simple background, skirt, solo, twintails, white background, white skirt |
Generation settings:
nsfw, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name
Upsampling settings:
long
-1
Before applying styles
(The seeds are not the same.)
Input prompt | Very unvaried | Unvaried | Normal | Varied | Very varied |
1girl, solo, from side | |||||
1girl, frieren, sousou no frieren, | |||||
no humans, scenery |
Very unvaried
and Unvaried
mean less variety, but at the same time, faithful to the input prompt and generate relatively acceptable tags. Also, Very varied
and Varied
mean more variety, but tend to ignore the input prompt and often generate weird tags.
This extension uses the following model:
p1atdev/dart-v1-sft
: ? HuggingFaceA demo on ? Space is avaiable, so you can try upsampling tags without installing this extension:
Demo: https://huggingface.co/spaces/p1atdev/danbooru-tags-transformer
Open [webui's root directory]/ui-config.json
, then find parameters staring with customscript/dart_upsampler.py/
and edit them.
If you feel that the default values are broken, you can delete parameters staring with customscript/dart_upsampler.py/txt2img/
to reset the default values.
This project has been influenced by the following projects and researches. We express our respect and gratitude to the developers and contributors of these projects: