forked from toriato/stable-diffusion-webui-wd14-tagger
-
Notifications
You must be signed in to change notification settings - Fork 73
/
preload.py
26 lines (23 loc) · 909 Bytes
/
preload.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
""" Preload module for DeepDanbooru or onnxtagger. """
from argparse import ArgumentParser
def preload(parser: ArgumentParser):
""" Preload module for DeepDanbooru or onnxtagger. """
# 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).'
)
parser.add_argument(
'--onnxtagger-path',
type=str,
help='Path to directory with Onnyx project(s).'
)
# TODO allow using devices in parallel, specified as comma separed list
parser.add_argument(
'--additional-device-ids',
type=str,
help='Device ID to use. cpu:0, gpu:0 or gpu:1, etc.',
)