diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-27 11:28:12 +0300 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-27 11:28:12 +0300 |
commit | d2ac95fa7b2a8d0bcc5361ee16dba9cbb81ff8b2 (patch) | |
tree | 056355bca8b5ff3071f4aec4a0c4d725f026413a /modules/api/api.py | |
parent | 7a14c8ab45da8a681792a6331d48a88dd684a0a9 (diff) |
remove the need to place configs near models
Diffstat (limited to 'modules/api/api.py')
-rw-r--r-- | modules/api/api.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/api/api.py b/modules/api/api.py index 25c65e57..eb7b1da5 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -18,7 +18,8 @@ from modules.textual_inversion.textual_inversion import create_embedding, train_ from modules.textual_inversion.preprocess import preprocess from modules.hypernetworks.hypernetwork import create_hypernetwork, train_hypernetwork from PIL import PngImagePlugin,Image -from modules.sd_models import checkpoints_list, find_checkpoint_config +from modules.sd_models import checkpoints_list +from modules.sd_models_config import find_checkpoint_config_near_filename from modules.realesrgan_model import get_realesrgan_models from modules import devices from typing import List @@ -387,7 +388,7 @@ class Api: ] def get_sd_models(self): - return [{"title": x.title, "model_name": x.model_name, "hash": x.shorthash, "sha256": x.sha256, "filename": x.filename, "config": find_checkpoint_config(x)} for x in checkpoints_list.values()] + return [{"title": x.title, "model_name": x.model_name, "hash": x.shorthash, "sha256": x.sha256, "filename": x.filename, "config": find_checkpoint_config_near_filename(x)} for x in checkpoints_list.values()] def get_hypernetworks(self): return [{"name": name, "path": shared.hypernetworks[name]} for name in shared.hypernetworks] |