diff --git a/ldm/invoke/concepts_lib.py b/ldm/invoke/concepts_lib.py index 3b6d9e9bad..dcbfb4c9c0 100644 --- a/ldm/invoke/concepts_lib.py +++ b/ldm/invoke/concepts_lib.py @@ -36,7 +36,7 @@ class Concepts(object): models = self.hf_api.list_models(filter=ModelFilter(model_name='sd-concepts-library/')) self.concept_list = [a.id.split('/')[1] for a in models] except Exception as e: - print(' ** WARNING: Hugging Face textual inversion concepts libraries could not be loaded. The error was {str(e)}.') + print(f' ** WARNING: Hugging Face textual inversion concepts libraries could not be loaded. The error was {str(e)}.') print(' ** You may load .bin and .pt file(s) manually using the --embedding_directory argument.') return self.concept_list diff --git a/ldm/invoke/generator/inpaint.py b/ldm/invoke/generator/inpaint.py index 7798ed00c5..7b4d151265 100644 --- a/ldm/invoke/generator/inpaint.py +++ b/ldm/invoke/generator/inpaint.py @@ -27,7 +27,7 @@ if Globals.try_patchmatch: print('>> Patchmatch initialized') infill_methods.append('patchmatch') else: - print('>> Patchmatch not loaded, please see https://github.com/invoke-ai/InvokeAI/blob/patchmatch-install-docs/docs/installation/INSTALL_PATCHMATCH.md') + print('>> Patchmatch not loaded (nonfatal)') else: print('>> Patchmatch loading disabled') diff --git a/ldm/invoke/readline.py b/ldm/invoke/readline.py index af7a2f1f9b..aacddfb034 100644 --- a/ldm/invoke/readline.py +++ b/ldm/invoke/readline.py @@ -101,7 +101,7 @@ class Completer(object): self.linebuffer = None self.auto_history_active = True self.extensions = None - self.concepts = Concepts().list_concepts() + self.concepts = None return def complete(self, text, state): @@ -271,7 +271,8 @@ class Completer(object): def add_embedding_terms(self, terms:list[str]): self.concepts = Concepts().list_concepts() - self.concepts.extend(terms) + if self.concepts: + self.concepts.extend(terms) def _concept_completions(self, text, state): partial = text[1:] # this removes the leading '<'