Merge pull request #10823 from akx/model-loady

Upscaler model loading cleanup
This commit is contained in:
AUTOMATIC1111
2023-06-27 09:20:49 +03:00
committed by GitHub
7 changed files with 101 additions and 91 deletions

View File

@@ -25,7 +25,7 @@ def gfpgann():
return None
models = modelloader.load_models(model_path, model_url, user_path, ext_filter="GFPGAN")
if len(models) == 1 and "http" in models[0]:
if len(models) == 1 and models[0].startswith("http"):
model_file = models[0]
elif len(models) != 0:
latest_file = max(models, key=os.path.getctime)