create empty models folder on startup

pull/12/head
pkuliyi2015 2023-05-20 14:29:32 +00:00
parent fd93ad5956
commit d2dc384d18
2 changed files with 3 additions and 1 deletions

2
.gitignore vendored
View File

@ -4,4 +4,4 @@ __pycache__/
.DS_Store
# settings
models/*
models/*.ckpt

View File

@ -119,6 +119,8 @@ class Script(scripts.Script):
def load_model_list(self):
# traverse the CFG_PATH and add all files to the model list
self.model_list = {}
if not MODEL_PATH.exists():
MODEL_PATH.mkdir()
for file in MODEL_PATH.iterdir():
if file.is_file():
# save tha absolute path