Simplify a bunch of len(x) > 0/len(x) == 0 style expressions

This commit is contained in:
Aarni Koskela
2023-06-02 14:58:10 +03:00
parent 3e995778fc
commit 51864790fd
25 changed files with 47 additions and 48 deletions

View File

@@ -74,7 +74,7 @@ def forward_old(self: sd_hijack_clip.FrozenCLIPEmbedderWithCustomWordsBase, text
self.hijack.comments += hijack_comments
if len(used_custom_terms) > 0:
if used_custom_terms:
embedding_names = ", ".join(f"{word} [{checksum}]" for word, checksum in used_custom_terms)
self.hijack.comments.append(f"Used embeddings: {embedding_names}")