mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
do not display the message for TI unless the list of loaded embeddings changed
This commit is contained in:
parent
8d7382ab24
commit
aa6e55e001
@ -112,6 +112,7 @@ class EmbeddingDatabase:
|
|||||||
self.skipped_embeddings = {}
|
self.skipped_embeddings = {}
|
||||||
self.expected_shape = -1
|
self.expected_shape = -1
|
||||||
self.embedding_dirs = {}
|
self.embedding_dirs = {}
|
||||||
|
self.previously_displayed_embeddings = ()
|
||||||
|
|
||||||
def add_embedding_dir(self, path):
|
def add_embedding_dir(self, path):
|
||||||
self.embedding_dirs[path] = DirWithTextualInversionEmbeddings(path)
|
self.embedding_dirs[path] = DirWithTextualInversionEmbeddings(path)
|
||||||
@ -228,6 +229,9 @@ class EmbeddingDatabase:
|
|||||||
self.load_from_dir(embdir)
|
self.load_from_dir(embdir)
|
||||||
embdir.update()
|
embdir.update()
|
||||||
|
|
||||||
|
displayed_embeddings = (tuple(self.word_embeddings.keys()), tuple(self.skipped_embeddings.keys()))
|
||||||
|
if self.previously_displayed_embeddings != displayed_embeddings:
|
||||||
|
self.previously_displayed_embeddings = displayed_embeddings
|
||||||
print(f"Textual inversion embeddings loaded({len(self.word_embeddings)}): {', '.join(self.word_embeddings.keys())}")
|
print(f"Textual inversion embeddings loaded({len(self.word_embeddings)}): {', '.join(self.word_embeddings.keys())}")
|
||||||
if len(self.skipped_embeddings) > 0:
|
if len(self.skipped_embeddings) > 0:
|
||||||
print(f"Textual inversion embeddings skipped({len(self.skipped_embeddings)}): {', '.join(self.skipped_embeddings.keys())}")
|
print(f"Textual inversion embeddings skipped({len(self.skipped_embeddings)}): {', '.join(self.skipped_embeddings.keys())}")
|
||||||
|
Loading…
Reference in New Issue
Block a user