diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-01 16:55:55 +0300 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-01 16:55:55 +0300 |
commit | 0c9b1e7969b2adb39c38d17b481a689483059459 (patch) | |
tree | 721ae5bc4143f21c8034819755977dc4d293640d /modules/scripts.py | |
parent | 151b8ed3a62714793e2a212ac609a03dda0b1e26 (diff) | |
parent | 6a0d498c8ec5287a75e2a3bc8a4fa79e82e64c18 (diff) |
Merge branch 'dev' into multiple_loaded_models
Diffstat (limited to 'modules/scripts.py')
-rw-r--r-- | modules/scripts.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/scripts.py b/modules/scripts.py index 5b4edcac..edf7347e 100644 --- a/modules/scripts.py +++ b/modules/scripts.py @@ -646,6 +646,8 @@ def add_classes_to_gradio_component(comp): def IOComponent_init(self, *args, **kwargs):
+ self.webui_tooltip = kwargs.pop('tooltip', None)
+
if scripts_current is not None:
scripts_current.before_component(self, **kwargs)
@@ -663,8 +665,20 @@ def IOComponent_init(self, *args, **kwargs): return res
+def Block_get_config(self):
+ config = original_Block_get_config(self)
+
+ webui_tooltip = getattr(self, 'webui_tooltip', None)
+ if webui_tooltip:
+ config["webui_tooltip"] = webui_tooltip
+
+ return config
+
+
original_IOComponent_init = gr.components.IOComponent.__init__
+original_Block_get_config = gr.components.Block.get_config
gr.components.IOComponent.__init__ = IOComponent_init
+gr.components.Block.get_config = Block_get_config
def BlockContext_init(self, *args, **kwargs):
|