diff options
author | 不会画画的中医不是好程序员 <yfszzx@gmail.com> | 2022-10-10 12:21:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-10 12:21:25 +0000 |
commit | 1e18a5ffcc439b72adaaf425c0b79f3acb34322e (patch) | |
tree | 01f9c73c02076694a9bc3c965875646473771db8 /modules/upscaler.py | |
parent | 23f2989799ee3911d2959cfceb74b921f20c9a51 (diff) | |
parent | a3578233395e585e68c2118d3630cb2a961d4a36 (diff) | |
download | stable-diffusion-webui-gfx803-1e18a5ffcc439b72adaaf425c0b79f3acb34322e.tar.gz stable-diffusion-webui-gfx803-1e18a5ffcc439b72adaaf425c0b79f3acb34322e.tar.bz2 stable-diffusion-webui-gfx803-1e18a5ffcc439b72adaaf425c0b79f3acb34322e.zip |
Merge branch 'AUTOMATIC1111:master' into master
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 |