diff options
author | Liam <liamthekerr@gmail.com> | 2022-09-27 19:29:53 -0400 |
---|---|---|
committer | Liam <liamthekerr@gmail.com> | 2022-09-27 19:29:53 -0400 |
commit | e5707b66d6db2c019bfccf66f9ba53e3daaea40b (patch) | |
tree | 21becdc358730a4e24b4db01cef25093980af60b /modules/sd_hijack.py | |
parent | 981fe9c4a3994bb42ea5ff5212e4fe53b748bdd9 (diff) |
switched the token counter to use hidden buttons instead of api call
Diffstat (limited to 'modules/sd_hijack.py')
-rw-r--r-- | modules/sd_hijack.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py index 4d799ac0..bfbd07f9 100644 --- a/modules/sd_hijack.py +++ b/modules/sd_hijack.py @@ -273,8 +273,7 @@ class StableDiffusionModelHijack: def tokenize(self, text):
max_length = self.clip.max_length - 2
_, remade_batch_tokens, _, _, _, token_count = self.clip.process_text([text])
- return {"tokens": remade_batch_tokens[0], "token_count":token_count, "max_length":max_length}
-
+ return remade_batch_tokens[0], token_count, max_length
class FrozenCLIPEmbedderWithCustomWords(torch.nn.Module):
def __init__(self, wrapped, hijack):
|