Download stable-diffusion-webui-wd14-tagger/preload.py from CosVersin/e621-tagger-patch: direct link, hf CLI and curl.
- Browser
- Download file 821 Bytes
-
https://huggingface.co/datasets/CosVersin/e621-tagger-patch/resolve/main/stable-diffusion-webui-wd14-tagger/preload.py
- Command line
-
hf download hf://datasets/CosVersin/e621-tagger-patch/stable-diffusion-webui-wd14-tagger/preload.py
-
curl -L -o preload.py https://huggingface.co/datasets/CosVersin/e621-tagger-patch/resolve/main/stable-diffusion-webui-wd14-tagger/preload.py
821 Bytes
| from pathlib import Path | |
| from argparse import ArgumentParser | |
| from modules.shared import models_path | |
| default_ddp_path = Path(models_path, 'deepdanbooru') | |
| default_onnx_path = Path(models_path, 'TaggerOnnx') | |
| def preload(parser: ArgumentParser): | |
| # default deepdanbooru use different paths: | |
| # models/deepbooru and models/torch_deepdanbooru | |
| # https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/c81d440d876dfd2ab3560410f37442ef56fc6632 | |
| parser.add_argument( | |
| '--deepdanbooru-projects-path', | |
| type=str, | |
| help='Path to directory with DeepDanbooru project(s).', | |
| default=default_ddp_path | |
| ) | |
| parser.add_argument( | |
| '--onnxtagger-path', | |
| type=str, | |
| help='Path to directory with DeepDanbooru project(s).', | |
| default=default_onnx_path | |
| ) | |