mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
Minor metadata bug fix (second attempt)
This commit is contained in:
parent
2d97897a25
commit
92b2f57095
@ -92,9 +92,9 @@ def create_event_handlers():
|
|||||||
|
|
||||||
|
|
||||||
def get_truncation_length():
|
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
|
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
|
return shared.args.n_ctx
|
||||||
else:
|
else:
|
||||||
return shared.settings['truncation_length']
|
return shared.settings['truncation_length']
|
||||||
|
Loading…
Reference in New Issue
Block a user