Removed duplicate definition model_path

This commit is contained in:
Milly
2022-10-07 03:36:08 +09:00
committed by AUTOMATIC1111
parent a65a45272e
commit 0609ce06c0
7 changed files with 4 additions and 15 deletions

View File

@@ -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 not 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