From 306d764ff637ae94f3afa27136f9fdba9961105c Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 23 Oct 2023 12:46:24 -0700 Subject: [PATCH] Minor metadata bug fix --- 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 15c6c72e..de163558 100644 --- a/modules/ui_parameters.py +++ b/modules/ui_parameters.py @@ -91,9 +91,9 @@ def create_event_handlers(): def get_truncation_length(): - if shared.args.max_seq_len != shared.args_defaults.max_seq_len: + if 'max_seq_len' in shared.provided_arguments: return shared.args.max_seq_len - if shared.args.n_ctx != shared.args_defaults.n_ctx: + elif 'n_ctx' in shared.provided_arguments: return shared.args.n_ctx else: return shared.settings['truncation_length']