From 2769a1fa255d73cacf4e6dfe3ac4f07184e70bb7 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 21 Nov 2023 15:15:16 -0800 Subject: [PATCH] Hide deprecated args from Session tab --- modules/shared.py | 3 ++- modules/ui_session.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/shared.py b/modules/shared.py index 344daf1d..3ef9e4fa 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -195,7 +195,8 @@ for arg in sys.argv[1:]: provided_arguments.append(arg) # Deprecation warnings -for k in ['notebook', 'chat', 'no_stream', 'mul_mat_q', 'use_fast']: +deprecated_args = ['notebook', 'chat', 'no_stream', 'mul_mat_q', 'use_fast'] +for k in deprecated_args: if getattr(args, k): logger.warning(f'The --{k} flag has been deprecated and will be removed soon. Please remove that flag.') diff --git a/modules/ui_session.py b/modules/ui_session.py index 640b341c..0dbaea1c 100644 --- a/modules/ui_session.py +++ b/modules/ui_session.py @@ -58,7 +58,7 @@ def set_interface_arguments(extensions, bool_active): def get_boolean_arguments(active=False): - exclude = ["default", "notebook", "chat"] + exclude = shared.deprecated_args cmd_list = vars(shared.args) bool_list = sorted([k for k in cmd_list if type(cmd_list[k]) is bool and k not in exclude + ui.list_model_elements()])