e621-tagger-patch / README.md
CosVersin's picture
Upload 25 files
f292456

Tagger for Automatic1111's WebUI

Interrogate booru style tags for single or multiple image files using various models, such as DeepDanbooru.

한국어를 사용하시나요? 여기에 한국어 설명서가 있습니다!

Disclaimer

I didn't make any models, and most of the code was heavily borrowed from the DeepDanbooru and MrSmillingWolf's tagger.

Installation

  1. Extensions -> Install from URL -> Enter URL of this repository -> Press Install button

    • or clone this repository under extensions/
      $ git clone https://github.com/toriato/stable-diffusion-webui-wd14-tagger.git extensions/tagger
      
  2. Add interrogate model

    • MrSmilingWolf's model (a.k.a. Waifu Diffusion 1.4 tagger)

      Downloads automatically from the HuggingFace repository the first time you run it.

      Please ask the original author MrSmilingWolf#5991 for questions related to model or additional training.

      ViT vs Convnext

      To make it clear: the ViT model is the one used to tag images for WD 1.4. That's why the repo was originally called like that. This one has been trained on the same data and tags, but has got no other relation to WD 1.4, aside from stemming from the same coordination effort. They were trained in parallel, and the best one at the time was selected for WD 1.4

      This particular model was trained later and might actually be slightly better than the ViT one. Difference is in the noise range tho

      SmilingWolf from this thread in the 東方Project AI server

    • DeepDanbooru

      1. Various model files can be found below.

      2. Move the project folder containing the model and config to models/deepdanbooru

      3. The file structure should look like:

        models/
        └╴deepdanbooru/
          ├╴deepdanbooru-v3-20211112-sgd-e28/
          │ ├╴project.json
          │ └╴...
          │
          ├╴deepdanbooru-v4-20200814-sgd-e30/
          │ ├╴project.json
          │ └╴...
          │
          ├╴e621-v3-20221117-sgd-e32/
          │ ├╴project.json
          │ └╴...
          │
          ...
        
  3. Start or restart the WebUI.

    • or you can press refresh button after Interrogator dropdown box.

Model comparison

DeepDanbooru

Used the same image as the one used in the Screenshot item

deepdanbooru-v3-20211112-sgd-e28

1girl, animal ears, cat ears, cat tail, clothes writing, full body, rating:safe, shiba inu, shirt, shoes, simple background, sneakers, socks, solo, standing, t-shirt, tail, white background, white shirt

deepdanbooru-v4-20200814-sgd-e30

1girl, animal, animal ears, bottomless, clothes writing, full body, rating:safe, shirt, shoes, short sleeves, sneakers, solo, standing, t-shirt, tail, white background, white shirt

e621-v3-20221117-sgd-e32

anthro, bottomwear, clothing, footwear, fur, hi res, mammal, shirt, shoes, shorts, simple background, sneakers, socks, solo, standing, text on clothing, text on topwear, topwear, white background

Waifu Diffusion Tagger

wd14-vit

1boy, animal ears, dog, furry, leg hair, male focus, shirt, shoes, simple background, socks, solo, tail, white background

wd14-convnext

full body, furry, shirt, shoes, simple background, socks, solo, tail, white background

wd14-vit-v2

1boy, animal ears, cat, furry, male focus, shirt, shoes, simple background, socks, solo, tail, white background

wd14-convnext-v2

animal focus, clothes writing, earrings, full body, meme, shirt, shoes, simple background, socks, solo, sweat, tail, white background, white shirt

wd14-swinv2-v2

1boy, arm hair, black footwear, cat, dirty, full body, furry, leg hair, male focus, shirt, shoes, simple background, socks, solo, standing, tail, white background, white shirt

Screenshot

Screenshot

Artwork made by hecattaart

Copyright

Public domain, except borrowed parts (e.g. dbimutils.py)