diff options
author | DepFA <35278260+dfaker@users.noreply.github.com> | 2022-10-09 23:38:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-09 23:38:54 +0000 |
commit | 4117afff11c7b0a2162c73ea02be8cfa30d02640 (patch) | |
tree | af26f1b0c9eac8c024d2e51ec8fb5ca4a4d45ed3 /modules/upscaler.py | |
parent | e2c2925eb4d634b186de2c76798162ec56e2f869 (diff) | |
parent | 45fbd1c5fec887988ab555aac75a999d4f3aff40 (diff) | |
download | stable-diffusion-webui-gfx803-4117afff11c7b0a2162c73ea02be8cfa30d02640.tar.gz stable-diffusion-webui-gfx803-4117afff11c7b0a2162c73ea02be8cfa30d02640.tar.bz2 stable-diffusion-webui-gfx803-4117afff11c7b0a2162c73ea02be8cfa30d02640.zip |
Merge branch 'master' into embed-embeddings-in-images
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 |