diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-10-11 08:14:36 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-10-11 08:14:36 +0000 |
commit | 5de806184f6687e46cf936b92055146dc6cf2994 (patch) | |
tree | d84c2daa8798c3d2f8e99e17234a40065491182d /modules/upscaler.py | |
parent | 12c4d5c6b5bf9dd50d0601c36af4f99b65316d58 (diff) | |
parent | 948533950c9db5069a874d925fadd50bac00fdb5 (diff) | |
download | stable-diffusion-webui-gfx803-5de806184f6687e46cf936b92055146dc6cf2994.tar.gz stable-diffusion-webui-gfx803-5de806184f6687e46cf936b92055146dc6cf2994.tar.bz2 stable-diffusion-webui-gfx803-5de806184f6687e46cf936b92055146dc6cf2994.zip |
Merge branch 'master' into hypernetwork-training
Diffstat (limited to 'modules/upscaler.py')
-rw-r--r-- | modules/upscaler.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/upscaler.py b/modules/upscaler.py index d9d7c5e2..6ab2fb40 100644 --- a/modules/upscaler.py +++ b/modules/upscaler.py @@ -36,10 +36,11 @@ class Upscaler: self.half = not modules.shared.cmd_opts.no_half self.pre_pad = 0 self.mod_scale = None - if self.name is not None and create_dirs: + + if self.model_path is None and self.name: self.model_path = os.path.join(models_path, self.name) - if not os.path.exists(self.model_path): - os.makedirs(self.model_path) + if self.model_path and create_dirs: + os.makedirs(self.model_path, exist_ok=True) try: import cv2 |