diff --git a/modules/errorlimiter.py b/modules/errorlimiter.py index 93c96377a..b869a8553 100644 --- a/modules/errorlimiter.py +++ b/modules/errorlimiter.py @@ -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 diff --git a/modules/ui_common.py b/modules/ui_common.py index 4de125eb4..e4957e1df 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -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])