Use os.makedirs(..., exist_ok=True)

This commit is contained in:
Aarni Koskela
2023-05-29 10:18:15 +03:00
parent 59419bd64a
commit 165ab44f03
6 changed files with 6 additions and 15 deletions

View File

@@ -20,9 +20,7 @@ codeformer = None
def setup_model(dirname):
global model_path
if not os.path.exists(model_path):
os.makedirs(model_path)
os.makedirs(model_path, exist_ok=True)
path = modules.paths.paths.get("CodeFormer", None)
if path is None: