diff --git a/ldm/invoke/concepts_lib.py b/ldm/invoke/concepts_lib.py index 942406acd3..e40eda814d 100644 --- a/ldm/invoke/concepts_lib.py +++ b/ldm/invoke/concepts_lib.py @@ -46,6 +46,9 @@ class Concepts(object): the named concept. Returns None if invalid or cannot be downloaded. ''' + if not concept_name in self.list_concepts(): + print(f'This concept is not known to the Hugging Face library. Generation will continue without the concept.') + return None return self.get_concept_file(concept_name.lower(),'learned_embeds.bin') def concept_to_trigger(self, concept_name:str)->str: