aboutsummaryrefslogtreecommitdiff
path: root/modules/upscaler.py
diff options
context:
space:
mode:
authorssysm <me@theeditorstudio.com>2022-10-09 23:20:39 -0400
committerssysm <me@theeditorstudio.com>2022-10-09 23:20:39 -0400
commit6fdad291bd5a5edacedec73cf4d0e3852d00300e (patch)
tree5901473f27ea0410728150a1a6f2da373ea949b1 /modules/upscaler.py
parentcc92dc1f8d73dd4d574c4c8ccab78b7fc61e440b (diff)
parent45fbd1c5fec887988ab555aac75a999d4f3aff40 (diff)
Merge branch 'master' of https://github.com/AUTOMATIC1111/stable-diffusion-webui into upstream-master
Diffstat (limited to 'modules/upscaler.py')
-rw-r--r--modules/upscaler.py7
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