mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-15 14:50:55 -08:00
Use os.makedirs(..., exist_ok=True)
This commit is contained in:
parent
59419bd64a
commit
165ab44f03
6 changed files with 6 additions and 15 deletions
|
|
@ -298,8 +298,7 @@ def download_and_cache_models(dirname):
|
|||
download_url = 'https://github.com/opencv/opencv_zoo/blob/91fb0290f50896f38a0ab1e558b74b16bc009428/models/face_detection_yunet/face_detection_yunet_2022mar.onnx?raw=true'
|
||||
model_file_name = 'face_detection_yunet.onnx'
|
||||
|
||||
if not os.path.exists(dirname):
|
||||
os.makedirs(dirname)
|
||||
os.makedirs(dirname, exist_ok=True)
|
||||
|
||||
cache_file = os.path.join(dirname, model_file_name)
|
||||
if not os.path.exists(cache_file):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue