forked from Mikubill/sd-webui-controlnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
preload.py
39 lines (39 loc) · 1.22 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
def preload(parser):
parser.add_argument(
"--controlnet-dir",
type=str,
help="Path to directory with ControlNet models",
default=None,
)
parser.add_argument(
"--controlnet-annotator-models-path",
type=str,
help="Path to directory with annotator model directories",
default=None,
)
parser.add_argument(
"--no-half-controlnet",
action="store_true",
help="do not switch the ControlNet models to 16-bit floats (only needed without --no-half)",
default=None,
)
# Setting default max_size=16 as each cache entry contains image as both key
# and value (Very costly).
parser.add_argument(
"--controlnet-preprocessor-cache-size",
type=int,
help="Cache size for controlnet preprocessor results",
default=16,
)
parser.add_argument(
"--controlnet-loglevel",
default="INFO",
choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
help="Set the log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)",
)
parser.add_argument(
"--controlnet-tracemalloc",
action="store_true",
help="Enable memory tracing.",
default=None,
)