diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-10 08:05:02 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-10 08:05:02 +0000 |
commit | 028d3f6425d85f122027c127fba8bcbf4f66ee75 (patch) | |
tree | 05e714f118aaa4d25920918807e0b83344133629 /modules/interrogate.py | |
parent | e42de4b8a2356c6d286adb07292442d75e5595d3 (diff) | |
download | stable-diffusion-webui-gfx803-028d3f6425d85f122027c127fba8bcbf4f66ee75.tar.gz stable-diffusion-webui-gfx803-028d3f6425d85f122027c127fba8bcbf4f66ee75.tar.bz2 stable-diffusion-webui-gfx803-028d3f6425d85f122027c127fba8bcbf4f66ee75.zip |
ruff auto fixes
Diffstat (limited to 'modules/interrogate.py')
-rw-r--r-- | modules/interrogate.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/interrogate.py b/modules/interrogate.py index 22df9216..a1c8e537 100644 --- a/modules/interrogate.py +++ b/modules/interrogate.py @@ -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)
|