From 9a5e908ddfcbd1450d786af895def8a71ea24871 Mon Sep 17 00:00:00 2001 From: CalamitousFelicitousness Date: Sat, 21 Mar 2026 23:27:46 +0000 Subject: [PATCH] fix(ui): initialize max_length before tokenizer block --- modules/ui_common.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ui_common.py b/modules/ui_common.py index 133136d8d..4de125eb4 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -439,6 +439,7 @@ def update_token_counter(text: str): from modules.extra_networks import parse_prompt count_formatted = '0' + max_length = 0 visible = False prompt, _ = parse_prompt(text)