mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-23 08:43:42 +01:00
Make the models dir if required
This commit is contained in:
parent
6c1dda47c0
commit
18292e447c
@ -240,6 +240,9 @@ def getModels():
|
|||||||
|
|
||||||
def listModels(models_dirname, model_type, model_extensions):
|
def listModels(models_dirname, model_type, model_extensions):
|
||||||
models_dir = os.path.join(MODELS_DIR, models_dirname)
|
models_dir = os.path.join(MODELS_DIR, models_dirname)
|
||||||
|
if not os.path.exists(models_dir):
|
||||||
|
os.makedirs(models_dir)
|
||||||
|
|
||||||
for file in os.listdir(models_dir):
|
for file in os.listdir(models_dir):
|
||||||
for model_extension in model_extensions:
|
for model_extension in model_extensions:
|
||||||
if file.endswith(model_extension):
|
if file.endswith(model_extension):
|
||||||
|
Loading…
Reference in New Issue
Block a user