Commit
·
ca3c8e2
1
Parent(s):
7a10f37
Upload 5 files
Browse files- .gitignore +6 -0
- README.ko.md +61 -0
- README.md +63 -0
- preload.py +19 -0
- style.css +7 -0
.gitignore
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
__pycache__/
|
| 2 |
+
.vscode/
|
| 3 |
+
.venv/
|
| 4 |
+
.env
|
| 5 |
+
|
| 6 |
+
presets/
|
README.ko.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[Automatic1111 웹UI](https://github.com/AUTOMATIC1111/stable-diffusion-webui)를 위한 태깅(라벨링) 확장 기능
|
| 2 |
+
---
|
| 3 |
+
DeepDanbooru 와 같은 모델을 통해 단일 또는 여러 이미지로부터 부루에서 사용하는 태그를 알아냅니다.
|
| 4 |
+
|
| 5 |
+
[You don't know how to read Korean? Read it in English here!](README.md)
|
| 6 |
+
|
| 7 |
+
## 들어가기 앞서
|
| 8 |
+
모델과 대부분의 코드는 제가 만들지 않았고 [DeepDanbooru](https://github.com/KichangKim/DeepDanbooru) 와 MrSmillingWolf 의 태거에서 가져왔습니다.
|
| 9 |
+
|
| 10 |
+
## 설치하기
|
| 11 |
+
1. *확장기능* -> *URL로부터 확장기능 설치* -> 이 레포지토리 주소 입력 -> *설치*
|
| 12 |
+
- 또는 이 레포지토리를 `extensions/` 디렉터리 내에 클론합니다.
|
| 13 |
+
```sh
|
| 14 |
+
$ git clone https://github.com/toriato/stable-diffusion-webui-wd14-tagger.git extensions/tagger
|
| 15 |
+
```
|
| 16 |
+
|
| 17 |
+
1. 모델 추가하기
|
| 18 |
+
- #### *MrSmilingWolf's model (a.k.a. Waifu Diffusion 1.4 tagger)*
|
| 19 |
+
처음 실행할 때 [HuggingFace 레포지토리](https://huggingface.co/SmilingWolf/wd-v1-4-vit-tagger)로부터 자동으로 받아옵니다.
|
| 20 |
+
|
| 21 |
+
모델과 관련된 또는 추가 학습에 대한 질문은 원작자인 MrSmilingWolf#5991 으로 물어봐주세요.
|
| 22 |
+
|
| 23 |
+
- #### *DeepDanbooru*
|
| 24 |
+
1. 다양한 모델 파일은 아래 주소에서 찾을 수 있습니다.
|
| 25 |
+
- [DeepDanbooru model](https://github.com/KichangKim/DeepDanbooru/releases)
|
| 26 |
+
- [e621 model by 🐾Zack🐾#1984](https://discord.gg/BDFpq9Yb7K)
|
| 27 |
+
*(NSFW 주의!)*
|
| 28 |
+
|
| 29 |
+
1. 모델과 설정 파일이 포함된 프로젝트 폴더를 `models/deepdanbooru` 경로로 옮깁니다.
|
| 30 |
+
|
| 31 |
+
1. 파일 구조는 다음과 같습니다:
|
| 32 |
+
```
|
| 33 |
+
models/
|
| 34 |
+
└╴deepdanbooru/
|
| 35 |
+
├╴deepdanbooru-v3-20211112-sgd-e28/
|
| 36 |
+
│ ├╴project.json
|
| 37 |
+
│ └╴...
|
| 38 |
+
│
|
| 39 |
+
├╴deepdanbooru-v4-20200814-sgd-e30/
|
| 40 |
+
│ ├╴project.json
|
| 41 |
+
│ └╴...
|
| 42 |
+
│
|
| 43 |
+
├╴e621-v3-20221117-sgd-e32/
|
| 44 |
+
│ ├╴project.json
|
| 45 |
+
│ └╴...
|
| 46 |
+
│
|
| 47 |
+
...
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
1. 웹UI 를 시작하거나 재시작합니다.
|
| 51 |
+
- 또는 *Interrogator* 드롭다운 상자 우측에 있는 새로고침 버튼을 누릅니다.
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
## 스크린샷
|
| 55 |
+

|
| 56 |
+
|
| 57 |
+
Artwork made by [hecattaart](https://vk.com/hecattaart?w=wall-89063929_3767)
|
| 58 |
+
|
| 59 |
+
## 저작권
|
| 60 |
+
|
| 61 |
+
빌려온 코드(예: `dbimutils.py`)를 제외하고 모두 Public domain
|
README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Tagger for [Automatic1111's WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui)
|
| 2 |
+
---
|
| 3 |
+
Interrogate booru style tags for single or multiple image files using various models, such as DeepDanbooru.
|
| 4 |
+
|
| 5 |
+
[한국어를 사용하시나요? 여기에 한국어 설명서가 있습니다!](README.ko.md)
|
| 6 |
+
|
| 7 |
+
## Disclaimer
|
| 8 |
+
I didn't make any models, and most of the code was heavily borrowed from the [DeepDanbooru](https://github.com/KichangKim/DeepDanbooru) and MrSmillingWolf's tagger.
|
| 9 |
+
|
| 10 |
+
## Installation
|
| 11 |
+
1. *Extensions* -> *Install from URL* -> Enter URL of this repository -> Press *Install* button
|
| 12 |
+
- or clone this repository under `extensions/`
|
| 13 |
+
```sh
|
| 14 |
+
$ git clone https://github.com/toriato/stable-diffusion-webui-wd14-tagger.git extensions/tagger
|
| 15 |
+
```
|
| 16 |
+
|
| 17 |
+
1. *(optional)* Add interrogate model
|
| 18 |
+
- #### [*Waifu Diffusion 1.4 Tagger by MrSmilingWolf*](docs/what-is-wd14-tagger.md)
|
| 19 |
+
Downloads automatically from the [HuggingFace repository](https://huggingface.co/SmilingWolf/wd-v1-4-vit-tagger) the first time you run it.
|
| 20 |
+
|
| 21 |
+
- #### *DeepDanbooru*
|
| 22 |
+
1. Various model files can be found below.
|
| 23 |
+
- [DeepDanbooru models](https://github.com/KichangKim/DeepDanbooru/releases)
|
| 24 |
+
- [e621 model by 🐾Zack🐾#1984](https://discord.gg/BDFpq9Yb7K)
|
| 25 |
+
*(link contains NSFW contents!)*
|
| 26 |
+
|
| 27 |
+
1. Move the project folder containing the model and config to `models/deepdanbooru`
|
| 28 |
+
|
| 29 |
+
1. The file structure should look like:
|
| 30 |
+
```
|
| 31 |
+
models/
|
| 32 |
+
└╴deepdanbooru/
|
| 33 |
+
├╴deepdanbooru-v3-20211112-sgd-e28/
|
| 34 |
+
│ ├╴project.json
|
| 35 |
+
│ └╴...
|
| 36 |
+
│
|
| 37 |
+
├╴deepdanbooru-v4-20200814-sgd-e30/
|
| 38 |
+
│ ├╴project.json
|
| 39 |
+
│ └╴...
|
| 40 |
+
│
|
| 41 |
+
├╴e621-v3-20221117-sgd-e32/
|
| 42 |
+
│ ├╴project.json
|
| 43 |
+
│ └╴...
|
| 44 |
+
│
|
| 45 |
+
...
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
1. Start or restart the WebUI.
|
| 49 |
+
- or you can press refresh button after *Interrogator* dropdown box.
|
| 50 |
+
- "You must close stable diffusion completely after installation and re-run it!"
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
## Model comparison
|
| 54 |
+
[Model comparison](docs/model-comparison.md)
|
| 55 |
+
|
| 56 |
+
## Screenshot
|
| 57 |
+

|
| 58 |
+
|
| 59 |
+
Artwork made by [hecattaart](https://vk.com/hecattaart?w=wall-89063929_3767)
|
| 60 |
+
|
| 61 |
+
## Copyright
|
| 62 |
+
|
| 63 |
+
Public domain, except borrowed parts (e.g. `dbimutils.py`)
|
preload.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from pathlib import Path
|
| 2 |
+
from argparse import ArgumentParser
|
| 3 |
+
|
| 4 |
+
from modules.shared import models_path
|
| 5 |
+
|
| 6 |
+
default_ddp_path = Path(models_path, 'deepdanbooru')
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def preload(parser: ArgumentParser):
|
| 10 |
+
# default deepdanbooru use different paths:
|
| 11 |
+
# models/deepbooru and models/torch_deepdanbooru
|
| 12 |
+
# https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/c81d440d876dfd2ab3560410f37442ef56fc6632
|
| 13 |
+
|
| 14 |
+
parser.add_argument(
|
| 15 |
+
'--deepdanbooru-projects-path',
|
| 16 |
+
type=str,
|
| 17 |
+
help='Path to directory with DeepDanbooru project(s).',
|
| 18 |
+
default=default_ddp_path
|
| 19 |
+
)
|
style.css
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#rating-confidents .output-label>div:not(:first-child) {
|
| 2 |
+
cursor: pointer;
|
| 3 |
+
}
|
| 4 |
+
|
| 5 |
+
#tag-confidents .output-label>div:not(:first-child) {
|
| 6 |
+
cursor: pointer;
|
| 7 |
+
}
|