forked from Anime4000/sd_dreambooth_extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
preload.py
22 lines (19 loc) · 1.24 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
import argparse
import modules.safe
from extensions.sd_dreambooth_extension import reallysafe
def preload(parser: argparse.ArgumentParser):
# We really shouldn't have to do this...
# gradio.blocks.Blocks.process_api = xattention.process_api
modules.safe.RestrictedUnpickler = reallysafe.RestrictedUnpickler
parser.add_argument("--dreambooth-models-path", type=str, help="Path to directory to store Dreambooth model file("
"s).", default=None)
parser.add_argument("--lora-models-path", type=str, help="Path to directory to store Lora model file(s).",
default=None)
parser.add_argument("--ckptfix", action='store_true',
help="(Dreambooth) Enable fix for OOM errors when extracting checkpoints.")
parser.add_argument("--force-cpu", action='store_true',
help="(Dreambooth) Train using CPU only.")
parser.add_argument("--profile-db", action='store_true',
help="Set this to enable memory profiling while training. For science only.")
parser.add_argument("--debug-db", action='store_true',
help="Set this to enable memory logging. For science only.")