mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
@@ -12,7 +12,7 @@ _lock = Lock()
|
||||
|
||||
|
||||
def _make_unique(name: str):
|
||||
global _instance_id
|
||||
global _instance_id # pylint: disable=global-statement
|
||||
with _lock: # Guard against race conditions
|
||||
new_name = f"{name}__{_instance_id}"
|
||||
_instance_id += 1
|
||||
|
||||
@@ -476,7 +476,7 @@ def update_token_counter(text: str):
|
||||
token_counts = [len(group) - int(has_bos_token) - int(has_eos_token) for group in ids]
|
||||
if len(token_counts) > 1:
|
||||
visible = True
|
||||
count_formatted = f"{token_counts} {sum(token_counts)}" if shared.opts.prompt_detailed_tokens else str(sum(token_counts))
|
||||
count_formatted = f"{token_counts}/{sum(token_counts)}"
|
||||
elif len(token_counts) == 1 and token_counts[0] > 0:
|
||||
visible = True
|
||||
count_formatted = str(token_counts[0])
|
||||
|
||||
Reference in New Issue
Block a user