Check for the embedding manager

This commit is contained in:
dogewanwan 2022-08-24 21:46:50 +03:00 committed by GitHub
parent 781f054a20
commit 6a8e76e37f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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):