Fix up if "http" in ...: to be more sensible startswiths

This commit is contained in:
Aarni Koskela
2023-05-29 09:41:36 +03:00
parent 89352a2f52
commit 0afbc0c235
5 changed files with 8 additions and 8 deletions

View File

@@ -133,7 +133,7 @@ class UpscalerESRGAN(Upscaler):
scaler_data = UpscalerData(self.model_name, self.model_url, self, 4)
scalers.append(scaler_data)
for file in model_paths:
if "http" in file:
if file.startswith("http"):
name = self.model_name
else:
name = modelloader.friendly_name(file)
@@ -150,7 +150,7 @@ class UpscalerESRGAN(Upscaler):
return img
def load_model(self, path: str):
if "http" in path:
if path.startswith("http"):
filename = modelloader.load_file_from_url(
url=self.model_url,
model_dir=self.model_download_path,