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-20 13:09:36 +0000
commit8ea8e712c43e493a9c96dcec7dfbc036a8630c97 (patch)
treed546b3457cdd9bfa91252f8416e6b8ccb1791dcf /modules/scripts.py
parent6a04a7f20fcc4a992ae017b06723e9ceffe17b37 (diff)
downloadstable-diffusion-webui-gfx803-8ea8e712c43e493a9c96dcec7dfbc036a8630c97.tar.gz
stable-diffusion-webui-gfx803-8ea8e712c43e493a9c96dcec7dfbc036a8630c97.tar.bz2
stable-diffusion-webui-gfx803-8ea8e712c43e493a9c96dcec7dfbc036a8630c97.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: