ruff auto fixes

This commit is contained in:
AUTOMATIC
2023-05-10 11:05:02 +03:00
parent e42de4b8a2
commit 028d3f6425
22 changed files with 47 additions and 47 deletions

View File

@@ -159,7 +159,7 @@ class InterrogateModels:
text_array = text_array[0:int(shared.opts.interrogate_clip_dict_limit)]
top_count = min(top_count, len(text_array))
text_tokens = clip.tokenize([text for text in text_array], truncate=True).to(devices.device_interrogate)
text_tokens = clip.tokenize(list(text_array), truncate=True).to(devices.device_interrogate)
text_features = self.clip_model.encode_text(text_tokens).type(self.dtype)
text_features /= text_features.norm(dim=-1, keepdim=True)