From 92b2f57095ca538b681b307bd6952d7862340799 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Thu, 26 Oct 2023 18:57:32 -0700 Subject: [PATCH] Minor metadata bug fix (second attempt) --- modules/ui_parameters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui_parameters.py b/modules/ui_parameters.py index cd819a62..808b81f2 100644 --- a/modules/ui_parameters.py +++ b/modules/ui_parameters.py @@ -92,9 +92,9 @@ def create_event_handlers(): def get_truncation_length(): - if 'max_seq_len' in shared.provided_arguments: + if 'max_seq_len' in shared.provided_arguments or shared.args.max_seq_len != shared.args_defaults.max_seq_len: return shared.args.max_seq_len - elif 'n_ctx' in shared.provided_arguments: + elif 'n_ctx' in shared.provided_arguments or shared.args.n_ctx != shared.args_defaults.n_ctx: return shared.args.n_ctx else: return shared.settings['truncation_length']