aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordogewanwan <66496316+dogewanwan@users.noreply.github.com>2022-08-24 21:46:50 +0300
committerGitHub <noreply@github.com>2022-08-24 21:46:50 +0300
commit6a8e76e37f1d3d4aa09403b118025e5b2ffc7603 (patch)
treea5c53a15b97cbb5336376538a2ee011438708149
parent781f054a203c3175821cdedab16af32125fae7f1 (diff)
Check for the embedding manager
-rw-r--r--webui.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/webui.py b/webui.py
index 33da6c10..55654f55 100644
--- a/webui.py
+++ b/webui.py
@@ -469,8 +469,9 @@ def process_images(outpath, func_init, func_sample, prompt, seed, sampler_name,
def load_embeddings(fp):
+ if fp is not None and hasattr(model, "embedding_manager"):
# load the file
- model.embedding_manager.load(fp.name)
+ model.embedding_manager.load(fp.name)
def txt2img(prompt: str, ddim_steps: int, sampler_name: str, use_GFPGAN: bool, prompt_matrix: bool, ddim_eta: float, n_iter: int, batch_size: int, cfg_scale: float, seed: int, height: int, width: int, embeddings_fp):