diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-03-20 13:09:36 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-03-25 06:00:36 +0000 |
commit | 9f0da9f6edfb9be1d69ba3492a61d96db769307b (patch) | |
tree | 4cac745943f5bc425586c81bdda2cdef195111b9 /modules/scripts.py | |
parent | a9fed7c364061ae6efb37f797b6b522cb3cf7aa2 (diff) | |
download | stable-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.py | 3 |
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:
|