forked from alembics/disco-diffusion
-
Notifications
You must be signed in to change notification settings - Fork 17
/
disco.py
31 lines (22 loc) · 751 Bytes
/
disco.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
import os, sys
# Set base project directory to current working directory
PROJECT_DIR = os.path.abspath(os.getcwd())
# Import DD helper modules
sys.path.append(PROJECT_DIR)
import dd, dd_args
# Unsure about these:
os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"
# import warnings
# warnings.filterwarnings("ignore", category=UserWarning)
# Load parameters
pargs = dd_args.arg_configuration_loader()
# Setup folders
folders = dd.setupFolders(is_colab=dd.detectColab(), PROJECT_DIR=PROJECT_DIR, pargs=pargs)
# Load Models
dd.loadModels(folders)
dd.loadModels2(folders)
# Report System Details
dd.systemDetails(pargs)
# Get CUDA Device
device = dd.getDevice(pargs)
dd.start_run(pargs=pargs, folders=folders, device=device, is_colab=dd.detectColab())