diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-06-27 03:39:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-27 03:39:51 +0000 |
commit | a9e7a3db3edff6dca9afd7f967bde148c09fa70a (patch) | |
tree | c0e8c786faf2945fee80c79f9fb9be40b2e4ff4c /modules/gfpgan_model.py | |
parent | 001cbd369dcc0118b76eab8f037a230bbabbb767 (diff) | |
parent | 165ab44f03cc17dc3e4c35b3e5976f3d646c7ac7 (diff) | |
download | stable-diffusion-webui-gfx803-a9e7a3db3edff6dca9afd7f967bde148c09fa70a.tar.gz stable-diffusion-webui-gfx803-a9e7a3db3edff6dca9afd7f967bde148c09fa70a.tar.bz2 stable-diffusion-webui-gfx803-a9e7a3db3edff6dca9afd7f967bde148c09fa70a.zip |
Merge pull request #11199 from akx/makedirs
Use os.makedirs(..., exist_ok=True)
Diffstat (limited to 'modules/gfpgan_model.py')
-rw-r--r-- | modules/gfpgan_model.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/gfpgan_model.py b/modules/gfpgan_model.py index e239a09d..6ecd295c 100644 --- a/modules/gfpgan_model.py +++ b/modules/gfpgan_model.py @@ -70,11 +70,8 @@ gfpgan_constructor = None def setup_model(dirname):
- global model_path
- if not os.path.exists(model_path):
- os.makedirs(model_path)
-
try:
+ os.makedirs(model_path, exist_ok=True)
from gfpgan import GFPGANer
from facexlib import detection, parsing # noqa: F401
global user_path
|