aboutsummaryrefslogtreecommitdiff
path: root/modules/ui.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-01-07 08:43:08 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-01-07 08:43:08 +0300
commitc4a221c405401eb7b3a6ade3de1175dfb346126c (patch)
tree7c960b9230aaed0209e1434bcbbe8504ae04f492 /modules/ui.py
parent874b975bf8438b2b5ee6d8540d63b2e2da6b8dbd (diff)
parent1740c33547b62f692834c95914a2b295d51684c7 (diff)
Merge branch 'clip_hijack_rework'
Diffstat (limited to 'modules/ui.py')
-rw-r--r--modules/ui.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/ui.py b/modules/ui.py
index b79d24ee..5d2f5bad 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -368,7 +368,7 @@ def update_token_counter(text, steps):
flat_prompts = reduce(lambda list1, list2: list1+list2, prompt_schedules)
prompts = [prompt_text for step, prompt_text in flat_prompts]
- tokens, token_count, max_length = max([model_hijack.tokenize(prompt) for prompt in prompts], key=lambda args: args[1])
+ token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], key=lambda args: args[0])
style_class = ' class="red"' if (token_count > max_length) else ""
return f"<span {style_class}>{token_count}/{max_length}</span>"