change upscalers to download models into user-specified directory (from commandline args) rather than the default models/<...>

This commit is contained in:
AUTOMATIC
2023-05-19 09:09:00 +03:00
parent 379fd6204d
commit df6fffb054
7 changed files with 12 additions and 9 deletions

View File

@@ -121,8 +121,7 @@ class UpscalerScuNET(modules.upscaler.Upscaler):
def load_model(self, path: str):
device = devices.get_device_for('scunet')
if "http" in path:
filename = load_file_from_url(url=self.model_url, model_dir=self.model_path, file_name="%s.pth" % self.name,
progress=True)
filename = load_file_from_url(url=self.model_url, model_dir=self.model_download_path, file_name="%s.pth" % self.name, progress=True)
else:
filename = path
if not os.path.exists(os.path.join(self.model_path, filename)) or filename is None: