aboutsummaryrefslogtreecommitdiffstats
path: root/modules/scripts.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-03-20 13:09:36 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-03-25 06:00:36 +0000
commit9f0da9f6edfb9be1d69ba3492a61d96db769307b (patch)
tree4cac745943f5bc425586c81bdda2cdef195111b9 /modules/scripts.py
parenta9fed7c364061ae6efb37f797b6b522cb3cf7aa2 (diff)
downloadstable-diffusion-webui-gfx803-9f0da9f6edfb9be1d69ba3492a61d96db769307b.tar.gz
stable-diffusion-webui-gfx803-9f0da9f6edfb9be1d69ba3492a61d96db769307b.tar.bz2
stable-diffusion-webui-gfx803-9f0da9f6edfb9be1d69ba3492a61d96db769307b.zip
initial gradio 3.22 support
Diffstat (limited to 'modules/scripts.py')
-rw-r--r--modules/scripts.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/scripts.py b/modules/scripts.py
index 8de19884..40d8dcc6 100644
--- a/modules/scripts.py
+++ b/modules/scripts.py
@@ -521,6 +521,9 @@ def IOComponent_init(self, *args, **kwargs):
res = original_IOComponent_init(self, *args, **kwargs)
+ # this adds gradio-* to every component for css styling (ie gradio-button to gr.Button)
+ self.elem_classes = ["gradio-" + self.get_block_name(), *(self.elem_classes or [])]
+
script_callbacks.after_component_callback(self, **kwargs)
if scripts_current is not None: