From acf3dbbcc5ede1112b04c80177565a2ba54127e5 Mon Sep 17 00:00:00 2001 From: ye7iaserag Date: Wed, 17 May 2023 07:08:22 +0300 Subject: [PATCH] Allow extensions to have custom display_name (#1242) Co-authored-by: oobabooga <112222186+oobabooga@users.noreply.github.com> --- modules/extensions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/extensions.py b/modules/extensions.py index fe8cb7be..2b7af020 100644 --- a/modules/extensions.py +++ b/modules/extensions.py @@ -173,5 +173,7 @@ def create_extensions_block(): with gr.Column(elem_id="extensions"): for extension, name in iterator(): if hasattr(extension, "ui"): - gr.Markdown(f"\n### {name}") + gr.Markdown(f"\n### {extension.params['display_name']}" + if hasattr(extension, 'params') and extension.params.__contains__('display_name') + else f"\n### {name}") extension.ui()