mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
avoid leaking data to HuggingFace (#2021)
Before making a concept download request to HuggingFace, the concepts library module now checks the concept name against a downloaded list of all the concepts currently known to HuggingFace. If the requested concept is not on the list, then no download request is made.
This commit is contained in:
parent
de7abce464
commit
f1748d7017
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user