diff options
author | Ivan <ivan.demian2009@gmail.com> | 2023-01-27 12:21:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-27 12:21:48 +0000 |
commit | 63391419c11c1749a3d83dade19235a836c509f9 (patch) | |
tree | 5781c7fe6de7a61bb5936956e68e0582f03d7f6c /modules/api/api.py | |
parent | f5d73b6a6646b51027c8e6f6c6154f21b58d6af2 (diff) | |
parent | 9beb794e0b0dc1a0f9e89d8e38bd789a8c608397 (diff) | |
download | stable-diffusion-webui-gfx803-63391419c11c1749a3d83dade19235a836c509f9.tar.gz stable-diffusion-webui-gfx803-63391419c11c1749a3d83dade19235a836c509f9.tar.bz2 stable-diffusion-webui-gfx803-63391419c11c1749a3d83dade19235a836c509f9.zip |
Merge branch 'AUTOMATIC1111:master' into master
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] |